def command_done(self, res):
        self.setEnabled(True)

        ret, message = res
        if not ret:
            QMessageBox.warning(self.window, "Invalid details", message)
            return

        if self.just_save:
            Backups.save(self.backup)

        super().accept()
Example #2
0
    def command_done(self, ret):
        self.setEnabled(True)
        if not ret:
            QMessageBox.warning(
                self.window, "Invalid details",
                f"Backup {self.backup.name} has not been initialized")
            return
        Backups.save(self.backup)
        if self.backup.name != self.original_backup_name:
            Backups.change_name(self.original_backup_name, self.backup.name)

        self.window.app.scheduler.reload()

        super().accept()