jenkins-bot has submitted this change and it was merged.
Change subject: code improvements found by compat2core scripts/add_text.py ......................................................................
code improvements found by compat2core scripts/add_text.py
- replace site.lang by site.code because family method is code based - use page.title() method instead of deprecated one
Change-Id: I9ba6e8f461532efc1b41a013f6fd56308b30a45a --- M scripts/add_text.py 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Ladsgroup: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/add_text.py b/scripts/add_text.py index 90c0e22..11e63c8 100644 --- a/scripts/add_text.py +++ b/scripts/add_text.py @@ -136,7 +136,7 @@
errorCount = 0 site = pywikibot.Site() - pathWiki = site.family.nicepath(site.lang) + pathWiki = site.family.nicepath(site.code)
if putText: pywikibot.output(u'Loading %s...' % page.title()) @@ -159,7 +159,7 @@ # Understand if the bot has to skip the page or not # In this way you can use both -except and -excepturl if regexSkipUrl is not None: - url = '%s%s' % (pathWiki, page.urlname()) + url = '%s%s' % (pathWiki, page.title(asUrl=True)) result = re.findall(regexSkipUrl, site.getUrl(url)) if result != []: pywikibot.output(
pywikibot-commits@lists.wikimedia.org