r86563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86562‎ | r86563 | r86564 >
Date:22:44, 20 April 2011
Author:diederik
Status:deferred
Tags:
Comment:
Added catch empty exception.
Modified paths:
  • /trunk/tools/editor_trends/etl/store.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/store.py
@@ -100,7 +100,11 @@
101101 def store_articles(tasks, rts):
102102 db = storage.init_database(rts.storage, rts.dbname, rts.articles_raw)
103103 while True:
104 - filename = tasks.get(block=False)
 104+ try:
 105+ filename = tasks.get(block=False)
 106+ except Empty:
 107+ pass
 108+
105109 if filename == None:
106110 break
107111 print 'Processing %s...' % filename