changeset 30987:1ee685defe80

runtests: unindent an "if True" block The block was left to make review easier. This patch unindents it.
author Jun Wu <quark@fb.com>
date Wed, 15 Feb 2017 16:29:58 -0800
parents f07ca071a058
children d194f0dba7ac
files tests/run-tests.py
diffstat 1 files changed, 9 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Wed Feb 15 16:43:27 2017 -0800
+++ b/tests/run-tests.py	Wed Feb 15 16:29:58 2017 -0800
@@ -141,16 +141,15 @@
         family = socket.AF_INET6
     else:
         family = socket.AF_INET
-    if True:
-        try:
-            s = socket.socket(family, socket.SOCK_STREAM)
-            s.bind(('localhost', port))
-            s.close()
-            return True
-        except socket.error as exc:
-            if exc.errno not in (errno.EADDRINUSE, errno.EADDRNOTAVAIL,
-                                 errno.EPROTONOSUPPORT):
-                raise
+    try:
+        s = socket.socket(family, socket.SOCK_STREAM)
+        s.bind(('localhost', port))
+        s.close()
+        return True
+    except socket.error as exc:
+        if exc.errno not in (errno.EADDRINUSE, errno.EADDRNOTAVAIL,
+                             errno.EPROTONOSUPPORT):
+            raise
     return False
 
 closefds = os.name == 'posix'