r84848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84847‎ | r84848 | r84849 >
Date:14:49, 27 March 2011
Author:diederik
Status:deferred
Tags:
Comment:
Replaced cStringIO buffer with BZ2 file like object.
Modified paths:
  • /trunk/tools/editor_trends/etl/enricher.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/enricher.py
@@ -426,10 +426,11 @@
427427 print 'Processing took %s' % (t1 - t0)
428428 t0 = t1
429429 fh = bz2.BZ2File(filename, 'rb')
 430+ article = parse_xml(fh)
430431 if dataset == 'training':
431 - function(fh, cache, bots)
 432+ function(article, cache, bots)
432433 else:
433 - counts = function(fh, counts, bots)
 434+ counts = function(article, counts, bots)
434435 fh.close()
435436 # for data in unzip(filename):
436437 # if data.find('<page>') > -1: