jenkins-bot has submitted this change and it was merged.
Change subject: Inline function exclude
......................................................................
Inline function exclude
exclude(page, real_exclude=False) is a no-op that is invoked many times.
Change-Id: Ib830906570609b3456bd7d93a9e432edcfedcb05
---
M scripts/makecat.py
1 file changed, 1 insertion(+), 10 deletions(-)
Approvals:
John Vandenberg: Looks good to me, but someone else must approve
XZise: Looks good to me, approved
jenkins-bot: Verified
diff --git a/scripts/makecat.py b/scripts/makecat.py
index e523cff..4728d52 100644
--- a/scripts/makecat.py
+++ b/scripts/makecat.py
@@ -104,11 +104,6 @@
checked[refPage] = refPage
-def exclude(pl, real_exclude=True):
- if real_exclude:
- excludefile.write('%s\n' % pl.title())
-
-
def asktoadd(pl):
if pl.site != mysite:
return
@@ -141,10 +136,9 @@
include(pl)
break
elif answer == 'n':
- exclude(pl)
+ excludefile.write('%s\n' % pl.title())
break
elif answer == 'i':
- exclude(pl, real_exclude=False)
break
elif answer == 'o':
pywikibot.output(u"t: Give the beginning of the text of the page")
@@ -170,7 +164,6 @@
include(pl, checklinks=False)
else:
pywikibot.output(u"Page does not exist; not added.")
- exclude(pl, real_exclude=False)
break
elif answer == 'l':
pywikibot.output(u"Number of pages still to check: %s"
@@ -234,7 +227,6 @@
line = line[:-1]
except IndexError:
pass
- exclude(line, real_exclude=False)
pl = pywikibot.Page(mysite, line)
checked[pl] = pl
f.close()
@@ -253,7 +245,6 @@
for cat in subcatlist:
artlist = list(cat.articles())
for page in artlist:
- exclude(page.title(), real_exclude=False)
checked[page] = page
list = [x for x in workingcat.articles()]
if list:
--
To view, visit
https://gerrit.wikimedia.org/r/169523
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib830906570609b3456bd7d93a9e432edcfedcb05
Gerrit-PatchSet: 1
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: XZise <CommodoreFabianus(a)gmx.de>
Gerrit-Reviewer: jenkins-bot <>