better error handling
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Moritz 2023-10-25 13:37:06 +02:00
parent 37cb51674f
commit e186813a49
1 changed files with 8 additions and 3 deletions

View File

@ -150,9 +150,14 @@ def run_commands(commands):
def backup_volumes(backup_paths, apps, dry_run=False):
result = restic.backup(backup_paths, dry_run=dry_run, tags=apps)
print(result)
logging.info(result)
try:
result = restic.backup(backup_paths, dry_run=dry_run, tags=apps)
print(result)
logging.info(result)
except ResticFailedError as error:
logging.error(f"Backup failed for {apps}. Could not Backup these paths: {backup_paths}")
logging.error(error)
exit(1)
@cli.command()