r84763 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84762‎ | r84763 | r84764 >
Date:20:54, 25 March 2011
Author:diederik
Status:deferred
Tags:
Comment:
some code cleaning.
Modified paths:
  • /trunk/tools/editor_trends/etl/enricher.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/enricher.py
@@ -320,17 +320,12 @@
321321 continue
322322 counts.setdefault(contributor['username'], 0)
323323 counts[contributor['username']] += 1
 324+ revision.clear()
324325
325 - clear_xml_elements(article)
 326+ article = None
326327 return counts
327328
328329
329 -def clear_xml_elements(article):
330 - for elem in article:
331 - if type(elem) != type('str'):
332 - elem.clear()
333 -
334 -
335330 def create_variables(article, cache, bots):
336331 title = article['title']
337332 namespace = determine_namespace(title)
@@ -338,6 +333,7 @@
339334 if namespace != False:
340335 cache.stats.count_articles += 1
341336 article_id = article['id'].text
 337+ article['id'].clear()
342338 hashes = deque()
343339 size = {}
344340 revisions = article['revisions']

Status & tagging log