[Pywikipedia-svn] SVN: [7331] trunk/pywikipedia/welcome.py
alexsh at svn.wikimedia.org
alexsh at svn.wikimedia.org
Tue Sep 29 15:23:49 UTC 2009
Revision: 7331
Author: alexsh
Date: 2009-09-29 15:23:49 +0000 (Tue, 29 Sep 2009)
Log Message:
-----------
Fix API query counter bug and add message color tip in someone_found
Modified Paths:
--------------
trunk/pywikipedia/welcome.py
Modified: trunk/pywikipedia/welcome.py
===================================================================
--- trunk/pywikipedia/welcome.py 2009-09-29 13:03:11 UTC (rev 7330)
+++ trunk/pywikipedia/welcome.py 2009-09-29 15:23:49 UTC (rev 7331)
@@ -675,13 +675,14 @@
lev = query.GetData(params, self.site)
for x in lev['query']['logevents']:
someone_found = True
+ count += 1
if not globalvar.welcomeAuto and x['action'] == 'autocreate':
showStatus(3)
wikipedia.output(u'%s has been created automatically.' % x['user'])
continue
if x.has_key("userhidden"):
continue
- count += 1
+
yield userlib.User(self.site, x['user'])
if count < globalvar.queryLimit and lev.has_key('query-continue'):
@@ -689,6 +690,7 @@
else:
break
if someone_found:
+ showStatus(5)
wikipedia.output(u'There is nobody to be welcomed...')
else:
wikipedia.output(u'\nLoaded all users...')
@@ -728,6 +730,7 @@
yield userlib.User(self.site, userN)
if someone_found:
+ showStatus(5)
wikipedia.output(u'There is nobody to be welcomed...')
else:
wikipedia.output(u'\nLoaded all users...')
@@ -765,8 +768,6 @@
def run(self):
while True:
welcomed_count = 0
- #usoj = [x for x in ]
- #userlib.batchDumpInfo(usoj)
for users in self.parseNewUserLog():
if users.isBlocked():
showStatus(3)
More information about the Pywikipedia-svn
mailing list