aboutsummaryrefslogtreecommitdiffstats
path: root/backend/raw_write.py
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageia.org>2021-03-28 18:51:17 +0200
committerPapoteur <papoteur@mageia.org>2021-05-30 19:03:22 +0200
commitd3cee9d2ecdc2d9a1327b23a004ec782e138a816 (patch)
treed6b44f5c4747f37bf8cf591abdc33888bb21f5a2 /backend/raw_write.py
parent462899a3b78f2e9bd0fa4becfd1c741859268dc4 (diff)
downloadisodumper-d3cee9d2ecdc2d9a1327b23a004ec782e138a816.tar
isodumper-d3cee9d2ecdc2d9a1327b23a004ec782e138a816.tar.gz
isodumper-d3cee9d2ecdc2d9a1327b23a004ec782e138a816.tar.bz2
isodumper-d3cee9d2ecdc2d9a1327b23a004ec782e138a816.tar.xz
isodumper-d3cee9d2ecdc2d9a1327b23a004ec782e138a816.zip
Cleaning
Diffstat (limited to 'backend/raw_write.py')
-rwxr-xr-xbackend/raw_write.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py
index 7891b43..db903c5 100755
--- a/backend/raw_write.py
+++ b/backend/raw_write.py
@@ -134,7 +134,6 @@ class Dumper(object):
checked=0
sha512func=hashlib.sha3_512()
ncuts=int(b/1024)
- #try:
with open(target, 'rb') as f:
for x in range(0,ncuts):
block = f.read(1024)
@@ -147,7 +146,6 @@ class Dumper(object):
block = f.read(b-ncuts*1024)
sha512func.update(block)
sha512sumcalc=sha512func.hexdigest().upper()
- #f.close()
self.sum_check = ""
sum_type = "sha3"
sum_file = f"{source}.{sum_type}"
@@ -161,22 +159,15 @@ class Dumper(object):
logging.info(_("Sum file {} not found\n").format(sum_file))
self.sum_file = False
self.return_state = True
- #if self.signature_found and not self.signature_checked:
- ##, keep the pourcent, this is the place for source file name
- #self.return_message = _('Invalid signature for %s')%self.source_file
- #self.return_state = False
if (self.sum_check == "") : # Can't get stored sum
self.return_message += _('SHA3 sum: {}').format(sha512sumcalc)
# compare the sums
elif (sha512sumcalc == self.sum_check) :
- #if self.signature_checked and self.signature_found:
- #, keep the bracket, this is the place for sum type
- self.return_message +="\n" + _("The {} sum check is OK").format(sum_type)
+ #, keep the bracket, this is the place for sum type
+ self.return_message +="\n" + _("The {} sum check is OK").format(sum_type)
else:
self.return_message +="\n" + _("/!\\The computed and stored sums don't match")
self.return_state = False
- #except:
- #pass
self._progress = 100
logging.info(self.return_message)
self.finished.set()