jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/472866 )

Change subject: Use issue_deprecation_warning to deprecate option
......................................................................

Use issue_deprecation_warning to deprecate option

Change-Id: Ifd115dbd58cd27dde3b987ffb07e474f4714dfdc
---
M scripts/touch.py
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Framawiki: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scripts/touch.py b/scripts/touch.py
index 5172505..48ba7f6 100755
--- a/scripts/touch.py
+++ b/scripts/touch.py
@@ -26,6 +26,8 @@
 from pywikibot import pagegenerators

 from pywikibot.bot import MultipleSitesBot
+from pywikibot.exceptions import ArgumentDeprecationWarning
+from pywikibot.tools import issue_deprecation_warning

 docuReplacements = {'&params;': pagegenerators.parameterHelp}

@@ -87,8 +89,9 @@
         if arg == '-purge':
             bot_class = PurgeBot
         elif arg == '-redir':
-            pywikibot.output('-redirect option is deprecated, '
-                             'do not use it anymore.')
+            issue_deprecation_warning(
+                '\n-redir', None, 1, ArgumentDeprecationWarning,
+                since='20150514')
         elif not gen_factory.handleArg(arg) and arg.startswith('-'):
             # -botflag
             options[arg[1:].lower()] = True

--
To view, visit https://gerrit.wikimedia.org/r/472866
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: Ifd115dbd58cd27dde3b987ffb07e474f4714dfdc
Gerrit-Change-Number: 472866
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <[email protected]>
Gerrit-Reviewer: Framawiki <[email protected]>
Gerrit-Reviewer: John Vandenberg <[email protected]>
Gerrit-Reviewer: jenkins-bot (75)
_______________________________________________
Pywikibot-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikibot-commits

Reply via email to