jenkins-bot has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/800896 )
Change subject: [bugfix] Fix bugs in nowcommons.py ......................................................................
[bugfix] Fix bugs in nowcommons.py
Bug: T309473 Change-Id: I088d94917539fc1f16a5eb5df7da29282bdfcc51 --- M scripts/nowcommons.py 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: DannyS712: Looks good to me, but someone else must approve Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py index d323443..43feaec 100755 --- a/scripts/nowcommons.py +++ b/scripts/nowcommons.py @@ -277,7 +277,7 @@ + file_on_commons) if (local_file_page.title(with_ns=False) != commons_file_page.title(with_ns=False)): - using_pages = list(local_file_page.using_pages()) + using_pages = list(local_file_page.usingPages()) if using_pages and using_pages != [local_file_page]: pywikibot.output( '"<<lightred>>{}<<default>>" is still used in {} ' @@ -301,10 +301,10 @@ # previous function won't work is_used = bool(list(pywikibot.FilePage( self.site, - page.title()).using_pages(total=1))) + page.title()).usingPages(total=1))) if is_used and self.opt.replaceloose: bot = ImageBot( - local_file_page.usimgPages(), + local_file_page.usingPages(), local_file_page.title(with_ns=False, as_url=True), commons_file_page.title(with_ns=False), @@ -313,7 +313,7 @@ bot.run() # refresh because we want the updated list using_pages = len(list(pywikibot.FilePage( - self.site, page.title()).using_pages())) + self.site, page.title()).usingPages()))
else: pywikibot.output('Please change them manually.')
pywikibot-commits@lists.wikimedia.org