exception handling

This commit is contained in:
John Lancaster
2024-05-27 01:05:12 -05:00
parent 3a8ea1e4ee
commit 5d58c384ce
2 changed files with 7 additions and 5 deletions

View File

@@ -84,8 +84,11 @@ def main(
else: else:
func = run func = run
try:
func(backup_dir, loki_url, tag) func(backup_dir, loki_url, tag)
except Exception:
console.print_exception()
else:
snapshots.run(loki_url) snapshots.run(loki_url)

View File

@@ -3,8 +3,7 @@ from functools import wraps
import docker import docker
from docker.models.containers import Container from docker.models.containers import Container
from restic.console import logger, console
from restic.console import logger
def manage_containers(project: str, services: list[str]): def manage_containers(project: str, services: list[str]):