jenkins-bot has submitted this change and it was merged.
Change subject: [SYNC] synchronize with core ......................................................................
[SYNC] synchronize with core
- reorder imports, foreign imports first - use site properties instead oth site methods - new form of exception handling - update copyright string
Change-Id: I87d940ac43191ef5efb291b7d39498b406829062 --- M add_text.py 1 file changed, 7 insertions(+), 6 deletions(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/add_text.py b/add_text.py index 44ba099..4daa02a 100644 --- a/add_text.py +++ b/add_text.py @@ -66,7 +66,7 @@
# # (C) Filnik, 2007-2010 -# (C) Pywikipedia bot team, 2007-2013 +# (C) Pywikibot team, 2007-2013 # # Distributed under the terms of the MIT license. # @@ -77,11 +77,12 @@ import urllib2 import webbrowser import codecs +import time + import wikipedia as pywikibot import config from pywikibot import i18n import pagegenerators -import time
docuReplacements = { '¶ms;': pagegenerators.parameterHelp, @@ -291,8 +292,8 @@ return (False, False, always) elif choice == 'b': webbrowser.open("http://%s%s" % ( - page.site().hostname(), - page.site().nice_get_address(page.title()) + page.site.hostname(), + page.site.nice_get_address(page.title()) )) pywikibot.input("Press Enter when finished in browser.") if always or choice == 'y': @@ -314,12 +315,12 @@ continue else: raise pywikibot.ServerError(u'Fifth Server Error!') - except pywikibot.SpamfilterError, e: + except pywikibot.SpamfilterError as e: pywikibot.output( u'Cannot change %s because of blacklist entry %s' % (page.title(), e.url)) return (False, False, always) - except pywikibot.PageNotSaved, error: + except pywikibot.PageNotSaved as error: pywikibot.output(u'Error putting page: %s' % error.args) return (False, False, always) except pywikibot.LockedPage:
pywikibot-commits@lists.wikimedia.org