diff options
author | Rob Austein <sra@hactrn.net> | 2010-03-05 01:21:58 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-03-05 01:21:58 +0000 |
commit | e4f7b7ebba7ac820a080aeab8c1e91cf63f8edd3 (patch) | |
tree | 209a40ce53b3b6dda93901d6b0c0d0fbd5c8ed21 /myrpki.rototill/myirbe.py | |
parent | dac9c84f9f8484fe1b8dc3533a1b5a26d301e785 (diff) |
FINALLY figured out a (relatively) sane way to deal with XML
namespaces in xml.etree API: check and strip the one and only legal
namespace on read, add the one and only legal namespace on write, keep
all namespace glorp out of the rest of the code entirely.
svn path=/myrpki.rototill/myirbe.py; revision=3026
Diffstat (limited to 'myrpki.rototill/myirbe.py')
-rw-r--r-- | myrpki.rototill/myirbe.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/myrpki.rototill/myirbe.py b/myrpki.rototill/myirbe.py index 98fc91be..3fc4cedd 100644 --- a/myrpki.rototill/myirbe.py +++ b/myrpki.rototill/myirbe.py @@ -56,7 +56,11 @@ if hasattr(warnings, "catch_warnings"): else: import MySQLdb -tag = myrpki.tag +def tag(t): + """ + Wrap an element name in the right XML namespace goop. + """ + return "{" + myrpki.namespace + "}" + t def findbase64(tree, name, b64type = rpki.x509.X509): """ |