jenkins-bot merged this change.

View Change

Approvals: D3r1ck01: Looks good to me, approved Dvorapa: Looks good to me, but someone else must approve jenkins-bot: Verified
[IMPR] use issue_deprecation_warning for deprecated -autonomous option

Change-Id: I356c047c184af72e5f55accee7be2af88fa81497
---
M scripts/nowcommons.py
1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/scripts/nowcommons.py b/scripts/nowcommons.py
index 3add65c..3e7935b 100755
--- a/scripts/nowcommons.py
+++ b/scripts/nowcommons.py
@@ -59,10 +59,10 @@
import sys

import pywikibot
-
-from pywikibot import i18n, Bot
+from pywikibot import Bot, i18n
+from pywikibot.exceptions import ArgumentDeprecationWarning
from pywikibot import pagegenerators as pg
-from pywikibot.tools import filter_unique
+from pywikibot.tools import filter_unique, issue_deprecation_warning
from pywikibot.tools.formatter import color_format

from scripts.image import ImageRobot as ImageBot
@@ -391,8 +391,9 @@
raise NotImplementedError(
"The '-hash' argument is not implemented anymore.")
elif arg == '-autonomous':
- pywikibot.warning("The '-autonomous' argument is DEPRECATED,"
- " use '-always' instead.")
+ issue_deprecation_warning('-autonomous', '-always', 2,
+ ArgumentDeprecationWarning,
+ since='20140724')
options['always'] = True
elif arg.startswith('-'):
if arg[1:] in ('always', 'replace', 'replaceloose', 'replaceonly'):

To view, visit change 462461. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I356c047c184af72e5f55accee7be2af88fa81497
Gerrit-Change-Number: 462461
Gerrit-PatchSet: 4
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: D3r1ck01 <alangiderick@gmail.com>
Gerrit-Reviewer: Dvorapa <dvorapa@seznam.cz>
Gerrit-Reviewer: John Vandenberg <jayvdb@gmail.com>
Gerrit-Reviewer: jenkins-bot (75)