r85601 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85600‎ | r85601 | r85602 >
Date:01:34, 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
@@ -521,8 +521,9 @@
522522 '''
523523 namespaces = {}
524524 print 'Constructing namespace dictionary'
525 -
 525+ print xml_namespace
526526 elements = siteinfo.find('%s%s' % (xml_namespace, 'namespaces'))
 527+ print elements
527528 for elem in elements:
528529 key = int(elem.get('key'))
529530 namespaces[key] = elem.text #extract_text(ns)
@@ -531,6 +532,8 @@
532533 print key, text.encode('utf-8')
533534 except UnicodeEncodeError:
534535 print key
 536+ if namespaces == {}:
 537+ sys.exit(-1)
535538 return namespaces
536539
537540