[devtools] fix get_available_port implementation: it should only return the port number if unable to connect
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Wed, 09 Jun 2010 13:42:17 +0200
changeset 5700 2b2d8c2310aa
parent 5699 f4f6ee3af50b
child 5705 30b94973bc67
[devtools] fix get_available_port implementation: it should only return the port number if unable to connect
devtools/httptest.py
--- a/devtools/httptest.py	Wed Jun 09 12:43:21 2010 +0200
+++ b/devtools/httptest.py	Wed Jun 09 13:42:17 2010 +0200
@@ -48,7 +48,6 @@
         try:
             s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
             sock = s.connect(("localhost", port))
-            return port
         except socket.error, err:
             if err.args[0] in (111, 106):
                 return port