Fix socket error exception in Python 2. (#833)

This commit is contained in:
Robert Nishihara
2017-08-13 23:14:26 -07:00
committed by Philipp Moritz
parent 508eec58f5
commit a75ccc8032
+1 -1
View File
@@ -478,7 +478,7 @@ def start_ui(redis_address, stdout_file=None, stderr_file=None, cleanup=True):
port_test_socket.bind(("127.0.0.1", port))
port_test_socket.close()
break
except OSError:
except socket.error:
port += 1
new_env = os.environ.copy()
new_env["REDIS_ADDRESS"] = redis_address