mirror of
https://github.com/xcat2/confluent.git
synced 2025-07-15 09:11:31 +00:00
Have confetty show correct trace more easily
In some scenarios, the quitconfetty will overwrite the stack trace. Get the relevant trace before trying the quitconfetty, then print the saved trace.
This commit is contained in:
@ -1024,11 +1024,12 @@ if __name__ == '__main__':
|
||||
errcode = e.errorcode
|
||||
except Exception as e:
|
||||
import traceback
|
||||
excinfo = traceback.print_exc()
|
||||
try:
|
||||
quitconfetty()
|
||||
except Exception:
|
||||
pass
|
||||
traceback.print_exc()
|
||||
print(excinfo)
|
||||
finally:
|
||||
if deadline and os.times()[4] < deadline:
|
||||
sys.stderr.write('[Exited early, hit enter to continue]')
|
||||
|
Reference in New Issue
Block a user