diff options
| author | Timotej Lazar <timotej.lazar@araneo.si> | 2024-01-16 21:51:47 +0100 |
|---|---|---|
| committer | Timotej Lazar <timotej.lazar@araneo.si> | 2024-01-16 21:52:13 +0100 |
| commit | d3d72791cf2ffecf7ee564180e6b190226d692ed (patch) | |
| tree | b54474fcca22c2494b6f93cd8ba9c2e6ffd16e39 | |
| parent | 188567a42942dba1078ac7384ee9d9fe864594fa (diff) | |
Omit traceback from error output
| -rwxr-xr-x | margfools | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -8,7 +8,6 @@ import os import pathlib import subprocess import sys -import traceback import urllib.parse import getpass @@ -109,6 +108,6 @@ if __name__ == '__main__': if not r.text: break request |= json.loads(r.text) - except: - traceback.print_exc() + except Exception as ex: + print(ex, file=sys.stderr) input('press enter to exit') # don’t close terminal immediately on fail |
