jenkins-bot has submitted this change. (
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1324000?usp=email )
Change subject: nowcommons: Avoid repeated filename stripping
......................................................................
nowcommons: Avoid repeated filename stripping
Store the stripped template value before removing its namespace prefix.
Change-Id: I5e43cd788cd4da056b4941b266a5d3a7de43183b
---
M scripts/nowcommons.py
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
jenkins-bot: Verified
Xqt: Looks good to me, approved
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 7e4fd0d..04a21d5 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -252,8 +252,8 @@
file_on_commons = par[par.find(':') + 1:]
break
if val[0].strip() == '1':
- file_on_commons = \
- val[1].strip()[val[1].strip().find(':') + 1:]
+ filename = val[1].strip()
+ file_on_commons = filename[filename.find(':') + 1:]
break
skip = True
if not file_on_commons:
--
To view, visit
https://gerrit.wikimedia.org/r/c/pywikibot/core/+/1324000?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: I5e43cd788cd4da056b4941b266a5d3a7de43183b
Gerrit-Change-Number: 1324000
Gerrit-PatchSet: 2
Gerrit-Owner: Mahveotm <[email protected]>
Gerrit-Reviewer: Xqt <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
Pywikibot-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]