Ripristinate istruzioni originali, con chiamata a comando locale.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
6bfa6a3707
commit
dff74f0a35
@ -390,16 +390,12 @@ class Build(loaih.RemoteBuild):
|
|||||||
def __create_checksum__(self, file):
|
def __create_checksum__(self, file):
|
||||||
"""Internal function to create checksum file."""
|
"""Internal function to create checksum file."""
|
||||||
|
|
||||||
checksum = hashlib.md5()
|
checksum = subprocess.run(shlex.split(f"md5sum {file}"),
|
||||||
fullpath = os.path.join(self.appnamedir, file)
|
capture_output=True, text=True, encoding='utf-8', check=True)
|
||||||
|
|
||||||
if os.path.exists(fullpath):
|
if checksum.stdout:
|
||||||
with open(os.path.join(self.appnamedir, file), 'rb') as readfile:
|
with open(f"{file}.md5", 'w', encoding='utf-8') as checkfile:
|
||||||
for chunk in iter(lambda: readfile.read(4096), b""):
|
checkfile.write(checksum.stdout)
|
||||||
checksum.update(chunk)
|
|
||||||
|
|
||||||
with open(f"{file}.md5", 'w', encoding='utf-8') as csfile:
|
|
||||||
csfile.write(checksum.hexdigest())
|
|
||||||
|
|
||||||
|
|
||||||
def publish(self):
|
def publish(self):
|
||||||
|
Reference in New Issue
Block a user