jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/462144 )
Change subject: [cleanup] Remove handling of old -dry parameter
......................................................................
[cleanup] Remove handling of old -dry parameter
Bug: T205190
Change-Id: If18b60a417059b654917b1bb774e952075916970
---
M scripts/basic.py
1 file changed, 0 insertions(+), 30 deletions(-)
Approvals:
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/basic.py b/scripts/basic.py
index e5cd63d..282c2e7 100755
--- a/scripts/basic.py
+++ b/scripts/basic.py
@@ -36,7 +36,6 @@
from pywikibot.bot import (
SingleSiteBot, ExistingPageBot, NoRedirectPageBot, AutomaticTWSummaryBot)
-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.
@@ -88,38 +87,9 @@
# call initializer of the super class
super(BasicBot, self).__init__(site=True, **kwargs)
- # handle old -dry parameter
- self._handle_dry_param(**kwargs)
-
# assign the generator to the bot
self.generator = generator
- def _handle_dry_param(self, **kwargs):
- """
- Read the dry parameter and set the simulate variable instead.
-
- This is a private method. It prints a deprecation warning for old
- -dry paramter and sets the global simulate variable and informs
- the user about this setting.
-
- The constuctor of the super class ignores it because it is not
- part of self.availableOptions.
-
- @note: You should ommit this method in your own application.
-
- @keyword dry: deprecated option to prevent changes on live wiki.
- Use -simulate instead.
- @type dry: bool
- """
- if 'dry' in kwargs:
- issue_deprecation_warning('dry argument',
- 'pywikibot.config.simulate', 1,
- warning_class=FutureWarning,
- since='20160124')
- # use simulate variable instead
- pywikibot.config.simulate = True
- pywikibot.output('config.simulate was set to True')
-
def treat_page(self):
"""Load the given page, do some changes, and save
it."""
text = self.current_page.text
--
To view, visit
https://gerrit.wikimedia.org/r/462144
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: If18b60a417059b654917b1bb774e952075916970
Gerrit-Change-Number: 462144
Gerrit-PatchSet: 2
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot (75)