Revision: 7746
Author: xqt
Date: 2009-12-08 14:33:02 +0000 (Tue, 08 Dec 2009)
Log Message:
-----------
bugfix from old version
Modified Paths:
--------------
trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py 2009-12-08 14:28:28 UTC (rev 7745)
+++ trunk/pywikipedia/interwiki.py 2009-12-08 14:33:02 UTC (rev 7746)
@@ -1924,7 +1924,7 @@
def selectQuerySite(self):
"""Select the site the next query should go out for."""
# How many home-language queries we still have?
- mycount = self.counts.get(wikipedia.getSite(), 0)
+ mycount = self.counts.get(pywikibot.getSite(), 0)
# Do we still have enough subjects to work on for which the
# home language has been retrieved? This is rough, because
# some subjects may need to retrieve a second home-language page!
Revision: 7745
Author: xqt
Date: 2009-12-08 14:28:28 +0000 (Tue, 08 Dec 2009)
Log Message:
-----------
Bugfix for infinite loop and negative counter bug coming with r4834 (#2834606)
Modified Paths:
--------------
trunk/pywikipedia/interwiki.py
Modified: trunk/pywikipedia/interwiki.py
===================================================================
--- trunk/pywikipedia/interwiki.py 2009-12-08 11:17:55 UTC (rev 7744)
+++ trunk/pywikipedia/interwiki.py 2009-12-08 14:28:28 UTC (rev 7745)
@@ -1198,7 +1198,6 @@
# Now check whether any interwiki links should be added to the
# todo list.
-
if not page.exists():
pywikibot.output(u"NOTE: %s does not exist" % page.aslink(True))
if page == self.originPage:
@@ -1228,7 +1227,7 @@
if not redirectTargetPage.isRedirectPage():
self.originPage = redirectTargetPage
self.todo.add(redirectTargetPage)
- counter.plus(redirectTargetPage.site)
+ counter.plus(redirectTargetPage.site())
else:
# This is a redirect page to the origin. We don't need to
# follow the redirection.
@@ -1925,8 +1924,7 @@
def selectQuerySite(self):
"""Select the site the next query should go out for."""
# How many home-language queries we still have?
- ### it seems this counts a negative value
- mycount = max(0, self.counts.get(pywikibot.getSite(), 0))
+ mycount = self.counts.get(wikipedia.getSite(), 0)
# Do we still have enough subjects to work on for which the
# home language has been retrieved? This is rough, because
# some subjects may need to retrieve a second home-language page!
Revision: 7741
Author: alexsh
Date: 2009-12-07 17:12:39 +0000 (Mon, 07 Dec 2009)
Log Message:
-----------
fix 'file' in data for API verbose
Modified Paths:
--------------
trunk/pywikipedia/query.py
Modified: trunk/pywikipedia/query.py
===================================================================
--- trunk/pywikipedia/query.py 2009-12-07 17:11:40 UTC (rev 7740)
+++ trunk/pywikipedia/query.py 2009-12-07 17:12:39 UTC (rev 7741)
@@ -73,7 +73,7 @@
if wikipedia.verbose: #dump params info.
wikipedia.output(u"==== API action:%s ====" % params[u'action'])
- if data:
+ if data and 'file' not in data:
wikipedia.output(u"%s: (%d items)" % (data.keys()[0], titlecount ) )
for k, v in params.iteritems():