jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/508084 )
Change subject: [cleanup] Use issue_deprecation_warning for deprecated argument
......................................................................
[cleanup] Use issue_deprecation_warning for deprecated argument
detached from Ia4f257710
Change-Id: I2fc32ee31d8f2f48fcaa306ee461b8bec3294a27
---
M scripts/protect.py
1 file changed, 5 insertions(+), 4 deletions(-)
Approvals:
Dvorapa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/protect.py b/scripts/protect.py
index 5274121..126f536 100755
--- a/scripts/protect.py
+++ b/scripts/protect.py
@@ -62,7 +62,8 @@
import pywikibot
from pywikibot import i18n, pagegenerators
from pywikibot.bot import SingleSiteBot
-from pywikibot.tools.formatter import color_format
+from pywikibot.exceptions import ArgumentDeprecationWarning
+from pywikibot.tools import issue_deprecation_warning
# This is required for the text that is shown when you run this script
# with the parameter -help.
@@ -192,9 +193,9 @@
else:
options['expiry'] = arg[len('-expiry:'):]
elif arg.startswith('-images'):
- pywikibot.output(color_format(
- '\n{lightred}-image option is deprecated. '
- 'Please use -imagelinks instead.{default}\n'))
+ issue_deprecation_warning('-image', '-imagelinks', 2,
+ ArgumentDeprecationWarning,
+ since='20140213')
local_args.append('-imagelinks' + arg[7:])
elif arg.startswith('-unprotect'):
default_level = 'all'
--
To view, visit
https://gerrit.wikimedia.org/r/508084
To unsubscribe, or for help writing mail filters, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I2fc32ee31d8f2f48fcaa306ee461b8bec3294a27
Gerrit-Change-Number: 508084
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: D3r1ck01 <xsavitar.wiki(a)aol.com>
Gerrit-Reviewer: Dvorapa <dvorapa(a)seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)