Explorar o código

Correctly handle socket.timeout on windows.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Gary van der Merwe %!s(int64=11) %!d(string=hai) anos
pai
achega
90bfff55bc
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      dulwich/tests/compat/utils.py

+ 2 - 0
dulwich/tests/compat/utils.py

@@ -194,6 +194,8 @@ def check_for_daemon(limit=10, delay=0.1, timeout=0.1, port=TCP_GIT_PORT):
         try:
             s.connect(('localhost', port))
             return True
+        except socket.timeout:
+            pass
         except socket.error as e:
             if getattr(e, 'errno', False) and e.errno != errno.ECONNREFUSED:
                 raise