瀏覽代碼

Merge pull request #911 from l2dy/patch-1

Fix assert format string
Jelmer Vernooij 3 年之前
父節點
當前提交
d4ed520b29
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      dulwich/objects.py

+ 1 - 1
dulwich/objects.py

@@ -100,7 +100,7 @@ def _decompress(string):
 def sha_to_hex(sha):
     """Takes a string and returns the hex of the sha within"""
     hexsha = binascii.hexlify(sha)
-    assert len(hexsha) == 40, "Incorrect length of sha1 string: %d" % hexsha
+    assert len(hexsha) == 40, "Incorrect length of sha1 string: %s" % hexsha
     return hexsha