JJMC89 has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/888108 )
Change subject: [IMPR] flush: log the traceback when exiting by exception ......................................................................
[IMPR] flush: log the traceback when exiting by exception
Change-Id: I9fbb6a7f760a962cbf3a0f821437cd74a5534c1b --- M pywikibot/comms/http.py 1 file changed, 10 insertions(+), 0 deletions(-)
Approvals: JJMC89: Verified; Looks good to me, approved
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py index 7828acf..1a8f580 100644 --- a/pywikibot/comms/http.py +++ b/pywikibot/comms/http.py @@ -115,6 +115,7 @@ session.close()
if hasattr(sys, 'last_type'): + log(sys.last_traceback) critical(f'Exiting due to uncaught exception {sys.last_type}')
log('Network session closed.')
pywikibot-commits@lists.wikimedia.org