jenkins-bot has submitted this change and it was merged.
Change subject: [FIX] Protect: Use Python 2.6 compatible format
......................................................................
[FIX] Protect: Use Python 2.6 compatible format
Change-Id: Ie1d5fbe575b2edfaf59e5a111571470845890dfb
---
M pywikibot/page.py
M scripts/protect.py
2 files changed, 4 insertions(+), 4 deletions(-)
Approvals:
John Vandenberg: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/page.py b/pywikibot/page.py
index d96b8cb..9813c31 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1645,11 +1645,11 @@
if value is not None: # empty string is allowed
protections[arg_name] = value
pywikibot.bot.warning(u'"protections" argument of
'
- 'protect() replaces
"{}".'.format(arg_name))
+ 'protect() replaces
"{0}".'.format(arg_name))
else:
if value:
pywikibot.bot.warning(u'"protections" argument of
'
- 'protect() replaces "{}"; cannot
'
+ 'protect() replaces "{0}"; cannot
'
'use both.'.format(arg_name))
# buffer that, because it might get changed
diff --git a/scripts/protect.py b/scripts/protect.py
index 154493f..65f9787 100644
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -200,7 +200,7 @@
is_p_type = True
if not is_p_type:
if not genFactory.handleArg(arg):
- raise ValueError('Unknown parameter
"{}"'.format(arg))
+ raise ValueError('Unknown parameter
"{0}"'.format(arg))
found = arg.find(':') + 1
if found:
message_properties.update({'cat': arg[found:],
@@ -212,7 +212,7 @@
message_type = default_summaries[generator_type]
if message_type == 'simple' or message_properties:
options['summary'] = i18n.twtranslate(
- site, 'protect-{}'.format(message_type),
+ site, 'protect-{0}'.format(message_type),
message_properties)
generator = genFactory.getCombinedGenerator()
--
To view, visit
https://gerrit.wikimedia.org/r/181256
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1d5fbe575b2edfaf59e5a111571470845890dfb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>