We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b56e909 commit d5e523aCopy full SHA for d5e523a
hough/main.py
@@ -83,7 +83,7 @@ def analyse(
83
84
85
@app.command()
86
-# no @logit
+# no @logit - never log this one
87
def histogram(
88
results: ExistingFile,
89
) -> int:
hough/utils.py
@@ -59,7 +59,15 @@ def wrapper_logit(*args, **kwargs):
59
else:
60
common = CommonArgs()
61
args = args + (common,)
62
- _setup_loguru(common.loglevel, common.outpath)
+ try:
63
+ _setup_loguru(common.loglevel, common.outpath)
64
+ except ValueError:
65
+ print(
66
+ "Unable to create output directory or logfile! Aborting.",
67
+ file=sys.stderr,
68
+ )
69
+ exit(1)
70
+
71
logger.info(
72
f"=== Run started @ {datetime.datetime.now(datetime.UTC).isoformat()} ==="
73
)
0 commit comments