Преглед на файлове

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