jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/673458 )
Change subject: [fix] KeyboardInterrupt exception raises immediately
......................................................................
[fix] KeyboardInterrupt exception raises immediately
Using raise as the first or only operator of an except handler is
useless because it raises back the exception immediately.
KeyboardInterrupt is a BaseException and not catched by the following
Exception.
Change-Id: Ife17a2986433dae6fa44e2bcbbab633651f2dfa0
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 3 deletions(-)
Approvals:
Matěj Suchánek: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 5454262..9563b1b 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -24,7 +24,7 @@
"""
#
-# (C) Pywikibot team, 2008-2020
+# (C) Pywikibot team, 2008-2021
#
# Distributed under the terms of the MIT license.
#
@@ -168,8 +168,6 @@
pywikibot.output('Server error: retrying in 5 seconds...')
time.sleep(5)
continue
- except KeyboardInterrupt:
- raise
except Exception:
return (None, None)
--
To view, visit https://gerrit.wikimedia.org/r/c/pywikibot/core/+/673458
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: Ife17a2986433dae6fa44e2bcbbab633651f2dfa0
Gerrit-Change-Number: 673458
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: D3r1ck01 <[email protected]>
Gerrit-Reviewer: Matěj Suchánek <[email protected]>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits