Browse Source

Correctly handle socket.timeout on windows.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Gary van der Merwe 11 năm trước cách đây
mục cha
commit
90bfff55bc
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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