jenkins-bot has submitted this change and it was merged.
Change subject: Use pywikibot.input instead of raw_input
......................................................................
Use pywikibot.input instead of raw_input
Also removed unused rawtoclean method.
bug: 69060
Change-Id: Ia805687f12fa914a15405085bb854ffe34b05fc1
---
M scripts/makecat.py
1 file changed, 2 insertions(+), 9 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
Mpaa: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/makecat.py b/scripts/makecat.py
index 3db5ecf..fe4d372 100644
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -44,12 +44,6 @@
from pywikibot import date, pagegenerators, i18n
-def rawtoclean(c):
- #Given the 'raw' category, provides the 'clean' category
- c2 = c.title().split('|')[0]
- return pywikibot.Page(mysite, c2)
-
-
def isdate(s):
"""returns true if s is a date or year """
dict, val = date.getAutoFormat(pywikibot.Site().language(), s)
@@ -158,7 +152,7 @@
pywikibot.output(u"a: Add another page")
pywikibot.output(u"l: Give a list of the pages to check")
elif answer == 'a':
- pagetitle = raw_input("Specify page to add:")
+ pagetitle = pywikibot.input("Specify page to add:")
page = pywikibot.Page(pywikibot.Site(), pagetitle)
if page not in checked.keys():
include(page)
@@ -216,11 +210,10 @@
workingcatname.append(arg)
if len(workingcatname) == 0:
- workingcatname = raw_input("Which page to start with? ")
+ workingcatname = pywikibot.input("Which page to start with? ")
else:
workingcatname = ' '.join(workingcatname)
mysite = pywikibot.Site()
- workingcatname = unicode(workingcatname, 'utf-8')
pywikibot.setAction(i18n.twtranslate(mysite, 'makecat-create',
{'cat': workingcatname}))
workingcat = pywikibot.Category(mysite,
u'%s:%s'
--
To view, visit
https://gerrit.wikimedia.org/r/151375
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia805687f12fa914a15405085bb854ffe34b05fc1
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: John Vandenberg <jayvdb(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: jenkins-bot <>