Index: trunk/tools/editor_trends/etl/enricher.py |
— | — | @@ -521,8 +521,9 @@ |
522 | 522 | ''' |
523 | 523 | namespaces = {} |
524 | 524 | print 'Constructing namespace dictionary' |
525 | | - |
| 525 | + print xml_namespace |
526 | 526 | elements = siteinfo.find('%s%s' % (xml_namespace, 'namespaces')) |
| 527 | + print elements |
527 | 528 | for elem in elements: |
528 | 529 | key = int(elem.get('key')) |
529 | 530 | namespaces[key] = elem.text #extract_text(ns) |
— | — | @@ -531,6 +532,8 @@ |
532 | 533 | print key, text.encode('utf-8') |
533 | 534 | except UnicodeEncodeError: |
534 | 535 | print key |
| 536 | + if namespaces == {}: |
| 537 | + sys.exit(-1) |
535 | 538 | return namespaces |
536 | 539 | |
537 | 540 | |