jenkins-bot has submitted this change and it was merged.
Change subject: replace Page.get() with core-like Page.text ......................................................................
replace Page.get() with core-like Page.text
replacements made by compat2core.py
Change-Id: I8c58a88ff97960a9438d98508b306965eb5fb9fe --- M scripts/commons_link.py 1 file changed, 2 insertions(+), 4 deletions(-)
Approvals: Ricordisamoa: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/commons_link.py b/scripts/commons_link.py index 3c7d749..acc34cc 100644 --- a/scripts/commons_link.py +++ b/scripts/commons_link.py @@ -34,8 +34,6 @@ # Ported by Geoffrey "GEOFBOT" Mon for Google Code-In 2013 # User:Sn1per # - - __version__ = '$Id$'
import re @@ -55,7 +53,7 @@ commons = pywikibot.Site().image_repository() commonspage = pywikibot.Page(commons, page.title()) try: - getcommons = commonspage.get(get_redirect=True) + getcommons = commonspage.text if page.title() == commonspage.title(): oldText = page.get() text = oldText @@ -110,7 +108,7 @@ commonsCategory = pywikibot.Category(commons, 'Category:%s' % page.title()) try: - getcommonscat = commonsCategory.get(get_redirect=True) + getcommonscat = commonsCategory.text commonsCategoryTitle = commonsCategory.title() categoryname = commonsCategoryTitle.split('Category:', 1)[1] if page.title() == categoryname:
pywikibot-commits@lists.wikimedia.org