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'
pywikibot-commits@lists.wikimedia.org