Ancora qualche correzione al codice per generare checksum.
This commit is contained in:
parent
7013318188
commit
059518ccbf
|
@ -382,6 +382,7 @@ class Build(loaih.RemoteBuild):
|
||||||
os.chdir(self.appnamedir)
|
os.chdir(self.appnamedir)
|
||||||
for arch in self.arch:
|
for arch in self.arch:
|
||||||
for item in [ self.appimagefilename[arch], self.zsyncfilename[arch] ]:
|
for item in [ self.appimagefilename[arch], self.zsyncfilename[arch] ]:
|
||||||
|
if self.built[arch]:
|
||||||
# For any built arch, find out if a file exist.
|
# For any built arch, find out if a file exist.
|
||||||
self.__create_checksum__(item)
|
self.__create_checksum__(item)
|
||||||
|
|
||||||
|
@ -390,7 +391,9 @@ class Build(loaih.RemoteBuild):
|
||||||
"""Internal function to create checksum file."""
|
"""Internal function to create checksum file."""
|
||||||
|
|
||||||
checksum = hashlib.md5()
|
checksum = hashlib.md5()
|
||||||
|
fullpath = os.path.join(self.appnamedir, file)
|
||||||
|
|
||||||
|
if os.path.exists(fullpath):
|
||||||
with open(os.path.join(self.appnamedir, file), 'rb') as readfile:
|
with open(os.path.join(self.appnamedir, file), 'rb') as readfile:
|
||||||
for chunk in iter(lambda: readfile.read(4096), b""):
|
for chunk in iter(lambda: readfile.read(4096), b""):
|
||||||
checksum.update(chunk)
|
checksum.update(chunk)
|
||||||
|
|
Loading…
Reference in New Issue