jenkins-bot has submitted this change and it was merged.
Change subject: (bug 58976) Do not get() the item straight after preloading it.
......................................................................
(bug 58976) Do not get() the item straight after preloading it.
The ItemPage.get() raises the NoPage exception if it does not exists.
It's not possible to catch this and return to the iterator:
try:
for page in preloaditempages():
# do something with page
except NoPage:
# ??? No way to continue processing the next page
By removing the internal .get(), we allow the following:
for page in preloaditempages():
# page is not guaranteed to exist now
try:
# do something with page
except NoPage:
# print an error
continue # with the next page
Change-Id: I9e09ba42e4562a962731f6c2cca70c020901828f
---
M pywikibot/site.py
1 file changed, 0 insertions(+), 1 deletion(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
Multichill: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/site.py b/pywikibot/site.py
index a090d04..31ef5b2 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3621,7 +3621,6 @@
for qid in data['entities']:
item = pywikibot.ItemPage(self, qid)
item._content = data['entities'][qid]
- item.get() # parses json and preloads the various properties
yield item
def getPropertyType(self, prop):
--
To view, visit https://gerrit.wikimedia.org/r/103900
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9e09ba42e4562a962731f6c2cca70c020901828f
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt <info(a)gno.de>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Legoktm <legoktm.wikipedia(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: Multichill <maarten(a)mdammers.nl>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: fixing typo in exception name
......................................................................
fixing typo in exception name
Change-Id: Ib53e10ab703fb5db490111b490c6bc104a530694
---
M lonelypages.py
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/lonelypages.py b/lonelypages.py
index 859bab8..8a8d71c 100644
--- a/lonelypages.py
+++ b/lonelypages.py
@@ -31,7 +31,7 @@
--- Credit and Help ---
This Script has been developed by Pietrodn and Filnik on botwiki. If you want to help us
-improving our script archive and pywikipediabot's archive or you simply need help
+improving our script archive and pywikibot's archive or you simply need help
you can find us here: http://botwiki.sno.cc
--- Examples ---
@@ -40,7 +40,7 @@
#
# (C) Pietrodn, it.wiki 2006-2007
# (C) Filnik, it.wiki 2007
-# (C) Pywikibot team, 2008-2013
+# (C) Pywikibot team, 2008-2014
#
# Distributed under the terms of the MIT license.
#
@@ -185,7 +185,7 @@
u"%s doesn't esist, I use the page as if it was blank!"
% enable.title())
getenable = ''
- except wikiepedia.IsRedirect:
+ except pywikibot.IsRedirect:
pywikibot.output(u"%s is a redirect, skip!" % enable.title())
getenable = ''
# If the enable page is set to disable, turn off the bot
@@ -201,7 +201,7 @@
except pywikibot.NoPage:
pywikibot.output(u"%s doesn't esist, skip!" % disambigpage.title())
disambigtext = ''
- except wikiepedia.IsRedirect:
+ except pywikibot.IsRedirect:
pywikibot.output(u"%s is a redirect, don't use it!"
% disambigpage.title())
disambigPage = None
--
To view, visit https://gerrit.wikimedia.org/r/105923
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ib53e10ab703fb5db490111b490c6bc104a530694
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: jenkins-bot
jenkins-bot has submitted this change and it was merged.
Change subject: updating MW version for Vikidia and Wikia
......................................................................
updating MW version for Vikidia and Wikia
Change-Id: Idd31d0b51065e097d6e5c1c5748a24a6084ad9eb
---
M families/vikidia_family.py
M families/wikia_family.py
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Ladsgroup: Looks good to me, approved
jenkins-bot: Verified
diff --git a/families/vikidia_family.py b/families/vikidia_family.py
index d09783d..99f5c30 100644
--- a/families/vikidia_family.py
+++ b/families/vikidia_family.py
@@ -106,7 +106,7 @@
# Which version of MediaWiki is used? REQUIRED
def version(self, code):
# Replace with the actual version being run on your wiki
- return '1.16.0'
+ return '1.22.0'
def code2encoding(self, code):
"""Return the encoding for a specific language wiki"""
diff --git a/families/wikia_family.py b/families/wikia_family.py
index bc39eaf..89df04b 100644
--- a/families/wikia_family.py
+++ b/families/wikia_family.py
@@ -39,7 +39,7 @@
return u'www.wikia.com'
def version(self, code):
- return "1.19.6"
+ return "1.19.9"
def scriptpath(self, code):
return ''
--
To view, visit https://gerrit.wikimedia.org/r/105716
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idd31d0b51065e097d6e5c1c5748a24a6084ad9eb
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Linedwell <Linedwell(a)icloud.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Xqt <info(a)gno.de>
Gerrit-Reviewer: jenkins-bot