# HG changeset patch # User Adrien Di Mascio # Date 1276083737 -7200 # Node ID 2b2d8c2310aa9547ca19693bc73febebcec83172 # Parent f4f6ee3af50bdd4d0397551a39ea08c910fe72ee [devtools] fix get_available_port implementation: it should only return the port number if unable to connect diff -r f4f6ee3af50b -r 2b2d8c2310aa 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