fall back correctly on creating namespace

This commit is contained in:
fpeters 2005-02-04 17:18:46 +00:00
parent fa3f859293
commit 3c5d75c33d
1 changed files with 3 additions and 1 deletions

View File

@ -668,7 +668,9 @@ def main():
for namespace in configuration.evaluateXpath("yep:namespace"):
name, uri = namespace.prop("name"), namespace.prop("uri")
if not namespaces.getUri(name):
try:
namespaces.getUri(name):
except KeyError:
ns = namespaces.Namespace(name, uri)
application.xpathContext.xpathRegisterNs(name, uri)