From d3d72791cf2ffecf7ee564180e6b190226d692ed Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Tue, 16 Jan 2024 21:51:47 +0100 Subject: [PATCH] Omit traceback from error output --- margfools | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/margfools b/margfools index cf4de00..759968e 100755 --- a/margfools +++ b/margfools @@ -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