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

--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/888108
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.wikimedia.org/r/settings

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I9fbb6a7f760a962cbf3a0f821437cd74a5534c1b
Gerrit-Change-Number: 888108
Gerrit-PatchSet: 2
Gerrit-Owner: JJMC89 <[email protected]>
Gerrit-Reviewer: JJMC89 <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to