diff options
author | Papoteur <papoteur@mageia.org> | 2020-12-21 08:07:21 +0100 |
---|---|---|
committer | Papoteur <papoteur@mageia.org> | 2020-12-21 08:17:23 +0100 |
commit | 4d72d0da0bd7960bba8eef08bb013290a61d9696 (patch) | |
tree | 7c615c3649d79dfaaa15bbc641ca6454420b21cf | |
parent | 3bd2651a5be5a37574f199669a45c2698b9caa5c (diff) | |
download | isodumper-4d72d0da0bd7960bba8eef08bb013290a61d9696.tar isodumper-4d72d0da0bd7960bba8eef08bb013290a61d9696.tar.gz isodumper-4d72d0da0bd7960bba8eef08bb013290a61d9696.tar.bz2 isodumper-4d72d0da0bd7960bba8eef08bb013290a61d9696.tar.xz isodumper-4d72d0da0bd7960bba8eef08bb013290a61d9696.zip |
Fix return state in raw_write when signature is false
-rwxr-xr-x | backend/raw_write.py | 7 | ||||
-rwxr-xr-x | lib/isodumper.py | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/backend/raw_write.py b/backend/raw_write.py index cdac7e2..508a9ae 100755 --- a/backend/raw_write.py +++ b/backend/raw_write.py @@ -119,10 +119,10 @@ class Dumper(object): return ifc.close() self._progress = 100 - self.finished.set() self.return_state = True self.return_message = _("Writing terminated") logging.debug(self.return_message) + self.finished.set() return def _get_sum(self, source): @@ -175,7 +175,6 @@ class Dumper(object): def _check_write(self, target, source): logging.debug("Start checking") - self.return_state = False self.return_message = "" b = os.path.getsize(source) # Compute the sum from the written device @@ -203,11 +202,12 @@ class Dumper(object): 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: + 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 and the sum is signed").format(self.sum_type) else : @@ -223,7 +223,6 @@ class Dumper(object): #except: #pass self._progress = 100 - logging.info(self.return_message) self.finished.set() diff --git a/lib/isodumper.py b/lib/isodumper.py index 669a2b9..9bde522 100755 --- a/lib/isodumper.py +++ b/lib/isodumper.py @@ -411,12 +411,12 @@ class IsoDumper(object): self.dialog.pollEvent() # Checking iface.check_write(target, source) - progress = iface.progress + progress = 0 while progress < 100: - progress = iface.progress self.progress.setValue(progress) self.dialog.pollEvent() time.sleep(.5) + progress = iface.progress nowarning, message = iface.end() self.progress.setEnabled() self.logger(message) |