Merge remote-tracking branch 'origin/pr/216'

* origin/pr/216:
  Add handling for backup in progress
This commit is contained in:
Marek Marczykowski-Górecki 2019-11-16 15:42:38 +01:00
commit 6886585d17
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,9 @@ class BackupThread(QtCore.QThread):
self.vm.app.qubesd_call( self.vm.app.qubesd_call(
'dom0', 'admin.backup.Execute', 'dom0', 'admin.backup.Execute',
backup_utils.get_profile_name(True)) backup_utils.get_profile_name(True))
except exc.BackupAlreadyRunningError:
msg.append("This backup is already in progress! Cancel it "
"or wait until it finishes.")
except Exception as ex: # pylint: disable=broad-except except Exception as ex: # pylint: disable=broad-except
msg.append(str(ex)) msg.append(str(ex))

View File

@ -16,3 +16,7 @@ class QubesDaemonNoResponseError(BaseException):
class BackupCancelledError(BaseException): class BackupCancelledError(BaseException):
pass pass
class BackupAlreadyRunningError(BaseException):
pass