Xqt has submitted this change and it was merged.
Change subject: Use % substitution instead of str.format ......................................................................
Use % substitution instead of str.format
Python 2.5 does not have str.format() and it is not strictly necessary here.
Change-Id: If23c8d2a42947381d25d26fced3437cbe35a900f --- M wikipedia.py 1 file changed, 3 insertions(+), 3 deletions(-)
Approvals: Xqt: Looks good to me, approved
diff --git a/wikipedia.py b/wikipedia.py index d0d8488..6d30811 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -185,7 +185,7 @@
# Format string for the default user agent. -USER_AGENT_FORMAT = '{script}/r{version[rev]} Pywikipediabot/1.0' +USER_AGENT_FORMAT = '%(script)s/r%(versionrev)s Pywikipediabot/1.0'
SaxError = xml.sax._exceptions.SAXParseException
@@ -5982,9 +5982,9 @@ useragent = s
# Default User-agent -setUserAgent(USER_AGENT_FORMAT.format( +setUserAgent(USER_AGENT_FORMAT % dict( script=('-'.join(version.get_executing_script())), - version=version.getversiondict() + versionrev=(version.getversiondict()["rev"]) ))
pywikibot-commits@lists.wikimedia.org