diff --git a/main.py b/main.py index 8f88bc9..4d4500e 100755 --- a/main.py +++ b/main.py @@ -122,5 +122,6 @@ try: # Wanna get a pretty JSON encoded library to do your nasty things offline at home? ;-) print(json.dumps(result, indent=4)) -except: - logging.error("Unexpected error:", sys.exc_info()[0]) +# Avoid printing on str{out,err} the unexpected exception traces. Log it instead. +except Exception as e: + logging.exception(e)