jenkins-bot has submitted this change and it was merged.
Change subject: Termination by KeyboardInterrupt is a graceful termination
......................................................................
Termination by KeyboardInterrupt is a graceful termination
Python3 doesn't contain the KeyboardInterruption whereas Python2 does.
To keep consistent for both versions and to consider bot owners halt request,
ignore that exception which in addition is already printed.
Change-Id: I3c204f132b2bd320463965262b14bdcd6566799a
---
M pywikibot/bot.py
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 6cca348..0bf57da 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -1366,7 +1366,7 @@
# exc_info contains exception from self.run() while terminating
exc_info = sys.exc_info()
- if exc_info[0] is None:
+ if exc_info[0] is None or exc_info[0] is KeyboardInterrupt:
pywikibot.output("Script terminated successfully.")
else:
pywikibot.output("Script terminated by exception:\n")
--
To view, visit https://gerrit.wikimedia.org/r/218344
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I3c204f132b2bd320463965262b14bdcd6566799a
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: XZise <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits