r84764 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84763‎ | r84764 | r84765 >
Date:21:05, 25 March 2011
Author:diederik
Status:deferred
Tags:
Comment:
it's friday afernoon...
Modified paths:
  • /trunk/tools/editor_trends/etl/enricher.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/enricher.py
@@ -241,14 +241,15 @@
242242 username = extracter.extract_username(contributor)
243243 user_id = extracter.extract_contributor_id(contributor)
244244 bot = extracter.determine_username_is_bot(contributor, bots=bots)
245 - contributor = {}
246 - contributor['username'] = username
247 - contributor['bot'] = bot
 245+ contributor.clear()
 246+ editor = {}
 247+ editor['username'] = username
 248+ editor['bot'] = bot
248249 if user_id != None:
249 - contributor.update(user_id)
 250+ editor.update(user_id)
250251 else:
251 - contributor = False
252 - return contributor
 252+ editor = False
 253+ return editor
253254
254255
255256 def determine_namespace(title):
@@ -258,7 +259,6 @@
259260 }
260261 ns = {}
261262 if title != None:
262 - #title = title.text
263263 for namespace in namespaces:
264264 if title.startswith(namespace):
265265 ns['namespace'] = namespaces[namespace]
@@ -373,9 +373,11 @@
374374 row.update(hash)
375375 row.update(size)
376376 row.update(revert)
 377+ revision.clear()
377378 cache.add(row)
378379
379380
 381+
380382 def parse_xml(buffer):
381383 context = iterparse(buffer, events=('end',))
382384 context = iter(context)

Status & tagging log