Browse Source

Add proper error message when server hangs up.

Jelmer Vernooij 15 năm trước cách đây
mục cha
commit
d3cf8696ce
2 tập tin đã thay đổi với 8 bổ sung0 xóa
  1. 4 0
      NEWS
  2. 4 0
      dulwich/errors.py

+ 4 - 0
NEWS

@@ -9,6 +9,10 @@
 
   * Use binascii.hexlify / binascii.unhexlify for better performance.
 
+  * Cope with extra unknown data in index files by ignoring it (for now).
+
+  * Add proper error message when server unexpectedly hangs up. (#415843)
+
 0.3.3	2009-07-23
 
  FEATURES

+ 4 - 0
dulwich/errors.py

@@ -104,3 +104,7 @@ class GitProtocolError(Exception):
 
 class HangupException(GitProtocolError):
     """Hangup exception."""
+
+    def __init__(self):
+        Exception.__init__(self,
+            "The remote server unexpectedly closed the connection.")