jenkins-bot merged this change.

View Change

Approvals: Framawiki: Looks good to me, approved jenkins-bot: Verified
Use issue_deprecation_warning to deprecate option

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

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 change 472866. To unsubscribe, or for help writing mail filters, visit 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 <info@gno.de>
Gerrit-Reviewer: Framawiki <framawiki@tools.wmflabs.org>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)