fix updater
This commit is contained in:
@@ -210,8 +210,13 @@ def apply_patch(s,patch,revert=False):
|
|||||||
|
|
||||||
|
|
||||||
def getSha(path):
|
def getSha(path):
|
||||||
f = open(path).read()
|
try:
|
||||||
return githash.blob_hash(path, len(f)).hexdigest()
|
f = open(path, 'rb')
|
||||||
|
except:
|
||||||
|
return ''
|
||||||
|
size = len(f.read())
|
||||||
|
f.seek(0)
|
||||||
|
return githash.blob_hash(f, size).hexdigest()
|
||||||
|
|
||||||
def getShaStr(str):
|
def getShaStr(str):
|
||||||
return githash.blob_hash(StringIO(str), len(str)).hexdigest()
|
return githash.blob_hash(StringIO(str), len(str)).hexdigest()
|
||||||
|
|||||||
Reference in New Issue
Block a user