JJMC89 submitted this change.

View Change


Approvals: JJMC89: Verified; Looks good to me, approved
[IMPR] flush: log the traceback when exiting by exception

Change-Id: I9fbb6a7f760a962cbf3a0f821437cd74a5534c1b
---
M pywikibot/comms/http.py
1 file changed, 10 insertions(+), 0 deletions(-)

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.')

To view, visit change 888108. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9fbb6a7f760a962cbf3a0f821437cd74a5534c1b
Gerrit-Change-Number: 888108
Gerrit-PatchSet: 2
Gerrit-Owner: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: JJMC89 <JJMC89.Wikimedia@gmail.com>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged