r85605 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85604‎ | r85605 | r85606 >
Date:01:47, 7 April 2011
Author:diederik
Status:deferred
Tags:
Comment:
Additional debug messages
Modified paths:
  • /trunk/tools/editor_trends/etl/enricher.py (modified) (history)

Diff [purge]

Index: trunk/tools/editor_trends/etl/enricher.py
@@ -642,6 +642,7 @@
643643
644644 article = {}
645645 article['revisions'] = []
 646+ elements = []
646647 id = False
647648
648649 try:
@@ -664,8 +665,11 @@
665666 article['revisions'] = []
666667 article['namespaces'] = namespaces
667668 id = False
668 - #elif rts.kaggle == True and event == 'end':
669 - # elem.clear()
 669+ elements = [elem.clear() for elem in elements]
 670+ elements = []
 671+ elif event == 'end':
 672+ elements.append(elem)
 673+
670674 except SyntaxError, error:
671675 print 'Encountered invalid XML tag. Error message: %s' % error
672676 dump(elem)