From 4e6a015f8c9ab0c9c91fe126c5b3b90942b5325c Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Thu, 24 Jun 2021 13:08:02 +0200 Subject: [PATCH] fixed check_track_sha1 subprocess.run --- source/get_github_file.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/get_github_file.py b/source/get_github_file.py index 2f4be56..808029a 100644 --- a/source/get_github_file.py +++ b/source/get_github_file.py @@ -30,7 +30,9 @@ def get_github_file(self, file): return -1 -def check_track_sha1(file, excepted_sha1): - sha1 = subprocess.run(["./tools/szs/wszst", "SHA1", file]).stdout.decode().split(" ")[0] +def check_track_sha1(self, file, excepted_sha1): + sha1 = subprocess.run(["./tools/szs/wszst", "SHA1", file, "--autoadd-path", "./file/auto-add/"], + check=True, creationflags=CREATE_NO_WINDOW, + stdout=subprocess.PIPE).stdout.decode().split(" ")[0] if excepted_sha1 == sha1: return 0 else: return -1