ne exception'ı olacak orda yav

This commit is contained in:
Gürer Özen
2007-07-18 10:55:18 +00:00
parent ece41e9c36
commit e1e02eaf50
+3 -8
View File
@@ -426,14 +426,9 @@ def sha1_file(filename):
def sha1_data(data):
"""Calculate sha1 hash of given data."""
try:
m = sha.new()
m.update(data)
return m.hexdigest()
except KeyboardInterrupt:
raise
except Exception: #FIXME: what exception could we catch here, replace with that.
raise Error(_("Cannot calculate SHA1 hash of given data"))
m = sha.new()
m.update(data)
return m.hexdigest()
def uncompress(patchFile, compressType="gz", targetDir=None):
"""Uncompress the file and return the new path."""