def action_backup_database(self): try: backup_database() except Exception as e: return False, str(e) return True, "Backup finished"
def cmd_backup_database(self, options, *args): """Backup the Stoq database""" setup_stoq() setup_logging() return backup_database(full=options.full)