瀏覽代碼

use make_sha rather than sha1.new() that's deprecated in python2.6.

Jelmer Vernooij 16 年之前
父節點
當前提交
ec4d7e7458
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      dulwich/objects.py

+ 4 - 1
dulwich/objects.py

@@ -32,6 +32,9 @@ from dulwich.errors import (
     NotCommitError,
     NotTreeError,
     )
+from dulwich.misc import (
+    make_sha,
+    )
 
 BLOB_ID = "blob"
 TAG_ID = "tag"
@@ -189,7 +192,7 @@ class ShaFile(object):
   
     def sha(self):
         """The SHA1 object that is the name of this object."""
-        ressha = sha.new()
+        ressha = make_sha()
         ressha.update(self._header())
         ressha.update(self._text)
         return ressha