diff options
| author | Anton Bobov <anton@bobov.name> | 2025-07-25 21:41:11 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2025-07-25 21:41:11 +0500 |
| commit | 0698299331a0be015b0854da6c10bdfbce31697d (patch) | |
| tree | 36e4ad721b4fcca093379e55cbba1d674d8bd3a5 | |
| parent | 16b63efa58429deed0c709f85867aab3a1f8a33f (diff) | |
Genmon weather show error only if verbose
| -rwxr-xr-x | genmon-wttr.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/genmon-wttr.py b/genmon-wttr.py index b9b3edd..04bf2a9 100755 --- a/genmon-wttr.py +++ b/genmon-wttr.py @@ -171,8 +171,9 @@ def main() -> None: weather_data = query_weather_data(args.location) post_process_weather_data(weather_data) print_genmon(weather_data) - except Exception as e: - logging.critical(e, exc_info=args.verbose) + except Exception: + if args.verbose: + raise sys.exit(1) |
