debug
This commit is contained in:
parent
a80a1ed897
commit
d3825451c4
|
@ -6,12 +6,12 @@ import subprocess
|
||||||
|
|
||||||
def hashFile(filename):
|
def hashFile(filename):
|
||||||
result = subprocess.check_output(['sha256sum', '--binary', '--zero', filename])[0:64]
|
result = subprocess.check_output(['sha256sum', '--binary', '--zero', filename])[0:64]
|
||||||
print("hashFile("+x+") = "+str(result), file=sys.stderr)
|
print("hashFile("+filename+") = "+str(result), file=sys.stderr)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def hash1(bytes):
|
def hash1(bytes):
|
||||||
result = subprocess.check_output(['sha256sum', '--binary', '--zero'], input=bytes)[0:64]
|
result = subprocess.check_output(['sha256sum', '--binary', '--zero'], input=bytes)[0:64]
|
||||||
print("hash1("+x+") = "+str(result), file=sys.stderr)
|
print("hash1("+bytes+") = "+str(result), file=sys.stderr)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -38,12 +38,12 @@ def hashGit(path):
|
||||||
FETCH_HEAD = "FETCH_HEAD" if ref_exists(path, "FETCH_HEAD") else ''
|
FETCH_HEAD = "FETCH_HEAD" if ref_exists(path, "FETCH_HEAD") else ''
|
||||||
HEAD = "HEAD" if ref_exists(path, "HEAD") else ''
|
HEAD = "HEAD" if ref_exists(path, "HEAD") else ''
|
||||||
result = subprocess.check_output(['sh', '-c', git_command.format(HEAD=HEAD, FETCH_HEAD=FETCH_HEAD)], cwd=path)
|
result = subprocess.check_output(['sh', '-c', git_command.format(HEAD=HEAD, FETCH_HEAD=FETCH_HEAD)], cwd=path)
|
||||||
print("hashGit("+x+") = "+str(result), file=sys.stderr)
|
print("hashGit("+path+") = "+str(result), file=sys.stderr)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def hashSqlite3(path):
|
def hashSqlite3(path):
|
||||||
result= subprocess.check_output(['sh', '-c', 'sqlite3 "$1" .dump | sort | sha256sum --binary --zero', '--', os.path.abspath(path)])
|
result= subprocess.check_output(['sh', '-c', 'sqlite3 "$1" .dump | sort | sha256sum --binary --zero', '--', os.path.abspath(path)])
|
||||||
print("hashSqlite3("+x+") = "+str(result), file=sys.stderr)
|
print("hashSqlite3("+path+") = "+str(result), file=sys.stderr)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def ignore_exitcode(cmd, **kwargs):
|
def ignore_exitcode(cmd, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user