revert.
This commit is contained in:
+10
-2
@@ -322,7 +322,11 @@ def sha1_file(filename):
|
|||||||
m.update(line)
|
m.update(line)
|
||||||
return m.hexdigest()
|
return m.hexdigest()
|
||||||
except IOError:
|
except IOError:
|
||||||
raise FileError(_("Cannot calculate SHA1 hash of %s") % filename)
|
# raise FileError(_("Cannot calculate SHA1 hash of %s") % filename)
|
||||||
|
#
|
||||||
|
# Don't raise Error here. Broken links can be present in
|
||||||
|
# package and returning 0 is totaly fine here!
|
||||||
|
return "0"
|
||||||
|
|
||||||
def sha1_data(data):
|
def sha1_data(data):
|
||||||
"""calculate sha1 hash of given data"""
|
"""calculate sha1 hash of given data"""
|
||||||
@@ -331,7 +335,11 @@ def sha1_data(data):
|
|||||||
m.update(data)
|
m.update(data)
|
||||||
return m.hexdigest()
|
return m.hexdigest()
|
||||||
except:
|
except:
|
||||||
raise Error(_("Cannot calculate SHA1 hash of given data"))
|
# raise Error(_("Cannot calculate SHA1 hash of given data"))
|
||||||
|
#
|
||||||
|
# Don't raise Error here. Broken links can be present in
|
||||||
|
# package and returning 0 is totaly fine here!
|
||||||
|
return "0"
|
||||||
|
|
||||||
def uncompress(patchFile, compressType="gz", targetDir=None):
|
def uncompress(patchFile, compressType="gz", targetDir=None):
|
||||||
"""uncompresses a file and returns the path of the uncompressed
|
"""uncompresses a file and returns the path of the uncompressed
|
||||||
|
|||||||
Reference in New Issue
Block a user