jenkins-bot has submitted this change and it was merged.
Change subject: Customizable CFD working page location.
......................................................................
Customizable CFD working page location.
Change-Id: I70be91075ff7c9e439e5a11b9adede1d3215164c
---
M cfd.py
1 file changed, 11 insertions(+), 5 deletions(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/cfd.py b/cfd.py
index 17d77c5..0cf0c09 100644
--- a/cfd.py
+++ b/cfd.py
@@ -17,9 +17,6 @@
import re
import category
-# The location of the CFD working page.
-cfdPage = 'Wikipedia:Categories for discussion/Working'
-
# A list of templates that are used on category pages as part of the CFD
# process that contain information such as the link to the per-day discussion
# page.
@@ -60,8 +57,17 @@
return self.result
-def main():
- pywikibot.handleArgs()
+def main(*args):
+ # The location of the CFD working page.
+ cfdPage = 'Wikipedia:Categories for discussion/Working'
+ for arg in pywikibot.handleArgs(*args):
+ # Use a non-default CFD working page if one is specified from the command-line
using -page.
+ if arg.startswith('-page'):
+ if len(arg) == len('-page'):
+ cfdPage = pywikibot.input(
+ u'Enter the CFD working page to use:')
+ else:
+ cfdPage = arg[len('-page:'):].replace('_', ' ')
page = pywikibot.Page(pywikibot.getSite(), cfdPage)
--
To view, visit
https://gerrit.wikimedia.org/r/122118
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I70be91075ff7c9e439e5a11b9adede1d3215164c
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Cyde <cydeweys(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>