summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-09-08 18:06:07 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-09-08 18:06:07 -0300
commit6daa2edea54d10e761d0432137373f226f2613ca (patch)
tree47d30f4c7447d4b30b417eedd85fff1bd814960c
parent6fb0e698eeeb4eda86df2f59b833eada0543fdc4 (diff)
downloadshiboken-6daa2edea54d10e761d0432137373f226f2613ca.tar.gz
shiboken-6daa2edea54d10e761d0432137373f226f2613ca.tar.xz
shiboken-6daa2edea54d10e761d0432137373f226f2613ca.zip
Store randon port after fail on first attempt.
Reviewer: Hugo Parente Lima <hugo.pl@gmail.com> Lauro Moura <lauro.neto@openbossa.org>
-rw-r--r--tests/util/httpd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/util/httpd.py b/tests/util/httpd.py
index 4d7dde94..03b44d65 100644
--- a/tests/util/httpd.py
+++ b/tests/util/httpd.py
@@ -125,7 +125,8 @@ class TestServer(threading.Thread):
try:
self.httpd = CompatTCPServer(('' , self._port), handle)
except:
- self.httpd = CompatTCPServer(('' , self._port + random.randint(1, 100)), handle)
+ self._port = self._port + random.randint(1, 100)
+ self.httpd = CompatTCPServer(('' , self._port), handle)
def port(self):
return self._port