瀏覽代碼

Correctly handle binascii.Error.

Gary van der Merwe 11 年之前
父節點
當前提交
ad2f8e3166
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dulwich/tests/compat/test_pack.py

+ 1 - 1
dulwich/tests/compat/test_pack.py

@@ -59,7 +59,7 @@ class TestPack(PackTests):
             sha = line[:40]
             try:
                 binascii.unhexlify(sha)
-            except TypeError:
+            except (TypeError, binascii.Error):
                 continue  # non-sha line
             pack_shas.add(sha)
         orig_shas = set(o.id for o in origpack.iterobjects())