mirror of
https://github.com/Faraphel/Atlas-Install.git
synced 2025-07-04 11:48:22 +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 requests
|
||||||
|
import subprocess
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from .definition import *
|
from .definition import *
|
||||||
|
@ -27,3 +28,9 @@ def get_github_file(self, file):
|
||||||
except:
|
except:
|
||||||
self.log_error()
|
self.log_error()
|
||||||
return -1
|
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