mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 03:38:26 +02:00
added check_track_sha1 to avoid download issue
This commit is contained in:
parent
23dddaadf3
commit
68c82393d6
1 changed files with 7 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
import requests
|
||||
import subprocess
|
||||
import os
|
||||
|
||||
from .definition import *
|
||||
|
@ -27,3 +28,9 @@ def get_github_file(self, file):
|
|||
except:
|
||||
self.log_error()
|
||||
return -1
|
||||
|
||||
|
||||
def check_track_sha1(file, excepted_sha1):
|
||||
sha1 = subprocess.run(["./tools/szs/wszst", "SHA1", file]).stdout.decode().split(" ")[0]
|
||||
if excepted_sha1 == sha1: return 0
|
||||
else: return -1
|
||||
|
|
Loading…
Reference in a new issue