r86948 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86947‎ | r86948 | r86949 >
Date:15:42, 26 April 2011
Author:diederik
Status:deferred
Tags:
Comment:
Removed unnecessary check.
Modified paths:
  • /trunk/tools/editor_trends/etl/store.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/store.py
@@ -55,16 +55,16 @@
5656 fh = file_utils.create_txt_filehandle(self.rts.sorted, filename,
5757 'r', 'utf-8')
5858 for line in file_utils.read_raw_data(fh):
59 - if len(line) == 12:
60 - editor = line[2]
61 - #print 'Parsing %s' % contributor
62 - if prev_editor != editor and prev_editor != -1:
63 - editor_cache.add(prev_editor, 'NEXT')
 59+ #if len(line) == 12:
 60+ editor = line[0]
 61+ #print 'Parsing %s' % editor
 62+ if prev_editor != editor and prev_editor != -1:
 63+ editor_cache.add(prev_editor, 'NEXT')
6464
65 - data = prepare_data(line)
66 - #print editor, data['username']
67 - editor_cache.add(editor, data)
68 - prev_editor = editor
 65+ data = prepare_data(line)
 66+ print editor, data['username']
 67+ editor_cache.add(editor, data)
 68+ prev_editor = editor
6969 fh.close()
7070 self.result.put(True)
7171
@@ -159,7 +159,7 @@
160160
161161 tasks.join()
162162
163 - print 'Creating indexes...'
 163+ print '\nCreating indexes...'
164164 db.add_index('id')
165165 db.add_index('title')
166166 db.add_index('ns')
@@ -208,7 +208,7 @@
209209 break
210210
211211 tasks.join()
212 - print 'Creating indexes...'
 212+ print '\nCreating indexes...'
213213 db.add_index('editor')
214214 db.add_index('username')
215215