jenkins-bot has submitted this change and it was merged.
Change subject: flake8 on several codes ......................................................................
flake8 on several codes
Simple things
Change-Id: I6adc276c100d2832b0f01c607d5e766ec267bd86 --- M scripts/create_categories.py M scripts/imagerecat.py M scripts/redirect.py 3 files changed, 4 insertions(+), 5 deletions(-)
Approvals: John Vandenberg: Looks good to me, approved jenkins-bot: Verified
diff --git a/scripts/create_categories.py b/scripts/create_categories.py index 1044b28..1baaf1d 100755 --- a/scripts/create_categories.py +++ b/scripts/create_categories.py @@ -32,7 +32,6 @@ # Distributed under the terms of the MIT license. # # -import sys import pywikibot from pywikibot import pagegenerators
diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py index df18464..c6f4c36 100644 --- a/scripts/imagerecat.py +++ b/scripts/imagerecat.py @@ -33,7 +33,6 @@ __version__ = '$Id$' #
-import sys import re import urllib import time diff --git a/scripts/redirect.py b/scripts/redirect.py index f76897e..016677a 100755 --- a/scripts/redirect.py +++ b/scripts/redirect.py @@ -480,15 +480,16 @@ u'Do you want to fix %s?' % (targetPage, movedTarget, redir_page)): try: - redir_page.put(text, reason) + redir_page.text = text + redir_page.save(reason) except pywikibot.NoUsername: pywikibot.output(u"Page [[%s]] not saved; " u"sysop privileges required." - % redir.title()) + % redir_page.title()) pass except pywikibot.LockedPage: pywikibot.output(u'%s is locked.' - % redir.title()) + % redir_page.title()) pass elif self.delete and self.prompt( u'Redirect target %s does not exist.\n'
pywikibot-commits@lists.wikimedia.org