Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr/163'
Browse files Browse the repository at this point in the history
* origin/pr/163:
  fix incorrect behavior after backup error
  • Loading branch information
marmarek committed Mar 23, 2019
2 parents 00ccce4 + 597a3e7 commit 26462a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion qubesmanager/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,10 @@ def backup_finished(self):
self, self.tr("Backup error!"),
self.tr("ERROR: {}").format(
self.thread.msg))
self.button(self.CancelButton).setEnabled(False)
self.button(self.FinishButton).setEnabled(True)
self.cleanup_temporary_files()

else:
self.progress_bar.setValue(100)
self.progress_status.setText(self.tr("Backup finished."))
Expand All @@ -373,7 +377,8 @@ def backup_finished(self):
os.system('systemctl poweroff')

def reject(self):
if self.currentPage() is self.commit_page:
if (self.currentPage() is self.commit_page) and \
self.button(self.CancelButton).isEnabled():
self.qubes_app.qubesd_call(
'dom0', 'admin.backup.Cancel',
backup_utils.get_profile_name(True))
Expand Down

0 comments on commit 26462a3

Please sign in to comment.