浏览代码

Correctly handle socket.timeout on windows.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Gary van der Merwe 11 年之前
父节点
当前提交
90bfff55bc
共有 1 个文件被更改,包括 2 次插入0 次删除
  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