jenkins-bot submitted this change.

View Change

Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
[bugfix] close handlers before deleting them

Bug: T286127
Bug: T91375
Change-Id: Id8437bae3b82e3c7d1de655e6592db81718a1b29
Signed-off-by: Xqt <info@gno.de>
---
M pywikibot/bot.py
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 5183905..febc008 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -387,6 +387,8 @@
warnings.filterwarnings('module')
warnings.filterwarnings('once', category=FutureWarning)

+ for handler in root_logger.handlers:
+ handler.close()
root_logger.handlers.clear() # remove any old handlers
root_logger.propagate = False # T281643


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

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Id8437bae3b82e3c7d1de655e6592db81718a1b29
Gerrit-Change-Number: 787457
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Russell Blau <russblau@imapmail.org>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged