Xqt has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/354873 )
Change subject: [IMPR] Catch KeyboardInterrupt and finally print execution time
in checkimages.py
......................................................................
[IMPR] Catch KeyboardInterrupt and finally print execution time in
checkimages.py
Change-Id: I737a9f4a62a3253f5eb3aaff5237180b9fd90375
---
M scripts/checkimages.py
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core
refs/changes/73/354873/1
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index ecdebda..06c222a 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1800,11 +1800,12 @@
if __name__ == "__main__":
start = time.time()
+ ret = None
try:
ret = main()
- except SystemExit:
+ except KeyboardInterrupt:
pass
- else:
+ finally:
if ret is not False:
final = time.time()
delta = int(final - start)
--
To view, visit https://gerrit.wikimedia.org/r/354873
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I737a9f4a62a3253f5eb3aaff5237180b9fd90375
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits