[Pywikipedia-l] SVN: [4901] trunk/pywikipedia/wikipedia.py
wikipedian at svn.wikimedia.org
wikipedian at svn.wikimedia.org
Wed Jan 16 16:03:43 UTC 2008
Revision: 4901
Author: wikipedian
Date: 2008-01-16 16:03:43 +0000 (Wed, 16 Jan 2008)
Log Message:
-----------
fixed displayed number of pages that need to be put
Modified Paths:
--------------
trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/wikipedia.py
===================================================================
--- trunk/pywikipedia/wikipedia.py 2008-01-16 14:33:43 UTC (rev 4900)
+++ trunk/pywikipedia/wikipedia.py 2008-01-16 16:03:43 UTC (rev 4901)
@@ -5693,10 +5693,12 @@
try:
_putthread.join(1)
except KeyboardInterrupt:
+ remainingPages = page_put_queue.qsize() - 1 # -1 because we added a None element to stop the queue
+ remainingSeconds = datetime.timedelta(seconds=(page_put_queue.qsize()) * config.put_throttle)
answer = inputChoice(u'There are %i pages remaining in the queue. Estimated time remaining: %s\nReally exit?'
- % (page_put_queue.qsize(), datetime.timedelta(seconds=(page_put_queue.qsize()) * config.put_throttle)),
+ % (remainingPages, remainingSeconds),
['yes', 'no'], ['y', 'N'], 'N')
- if answer in ['y', 'Y']:
+ if answer == 'y':
return
try:
get_throttle.drop()
More information about the Pywikipedia-l
mailing list