Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -320,17 +320,12 @@ |
321 | 321 | continue |
322 | 322 | counts.setdefault(contributor['username'], 0) |
323 | 323 | counts[contributor['username']] += 1 |
| 324 | + revision.clear() |
324 | 325 | |
325 | | - clear_xml_elements(article) |
| 326 | + article = None |
326 | 327 | return counts |
327 | 328 | |
328 | 329 | |
329 | | -def clear_xml_elements(article): |
330 | | - for elem in article: |
331 | | - if type(elem) != type('str'): |
332 | | - elem.clear() |
333 | | - |
334 | | - |
335 | 330 | def create_variables(article, cache, bots): |
336 | 331 | title = article['title'] |
337 | 332 | namespace = determine_namespace(title) |
— | — | @@ -338,6 +333,7 @@ |
339 | 334 | if namespace != False: |
340 | 335 | cache.stats.count_articles += 1 |
341 | 336 | article_id = article['id'].text |
| 337 | + article['id'].clear() |
342 | 338 | hashes = deque() |
343 | 339 | size = {} |
344 | 340 | revisions = article['revisions'] |