jenkins-bot has submitted this change and it was merged.
Change subject: No longer shows execution time if bot was not running
......................................................................
No longer shows execution time if bot was not running
Bug: T70613
Change-Id: I2a17f2f4f05a8b134237ccd5037ba02e42c6e1bc
---
M scripts/checkimages.py
1 file changed, 6 insertions(+), 5 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
XZise: Looks good to me, but someone else must approve
jenkins-bot: Verified
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 762f6d6..f351fef 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -1700,7 +1700,7 @@
if site.code not in project_inserted:
pywikibot.output(u"Your project is not supported by this script.\n"
u"You have to edit the script and add it!")
- return
+ return False
# Reading the log of the new images if another generator is not given.
if normal:
@@ -1764,10 +1764,11 @@
if __name__ == "__main__":
start = time.time()
try:
- main()
+ ret = main()
except SystemExit:
pass
else:
- final = time.time()
- delta = int(final - start)
- pywikibot.output("Execution time: %s seconds\n" % delta)
+ if ret is not False:
+ final = time.time()
+ delta = int(final - start)
+ pywikibot.output("Execution time: %s seconds\n" % delta)
--
To view, visit
https://gerrit.wikimedia.org/r/257850
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a17f2f4f05a8b134237ccd5037ba02e42c6e1bc
Gerrit-PatchSet: 9
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Georggi199 <bmp2558(a)gmail.com>
Gerrit-Reviewer: Hashar <hashar(a)free.fr>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Nemo bis <federicoleva(a)tiscali.it>
Gerrit-Reviewer: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>