diff options
Diffstat (limited to 'scripts/rpki/sax_utils.py')
-rw-r--r-- | scripts/rpki/sax_utils.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/rpki/sax_utils.py b/scripts/rpki/sax_utils.py index d645cc4f..1333df1a 100644 --- a/scripts/rpki/sax_utils.py +++ b/scripts/rpki/sax_utils.py @@ -23,6 +23,12 @@ class handler(xml.sax.handler.ContentHandler): def startElement(self, name, attrs): a = dict() for k,v in attrs.items(): + if isinstance(k, tuple): + if k == ('http://www.w3.org/XML/1998/namespace', 'lang'): + k = "xml:lang" + else: + assert k[0] is None + k = k[1] a[k.encode("ascii")] = v.encode("ascii") if len(self.stack) == 0: assert not hasattr(self, "result") |