summaryrefslogtreecommitdiff
path: root/mako/runtime.py
diff options
context:
space:
mode:
Diffstat (limited to 'mako/runtime.py')
-rw-r--r--mako/runtime.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/mako/runtime.py b/mako/runtime.py
index f9ce630..28186a9 100644
--- a/mako/runtime.py
+++ b/mako/runtime.py
@@ -482,15 +482,14 @@ class Namespace:
key = (self, uri)
if key in self.context.namespaces:
return self.context.namespaces[key]
- else:
- ns = TemplateNamespace(
- uri,
- self.context._copy(),
- templateuri=uri,
- calling_uri=self._templateuri,
- )
- self.context.namespaces[key] = ns
- return ns
+ ns = TemplateNamespace(
+ uri,
+ self.context._copy(),
+ templateuri=uri,
+ calling_uri=self._templateuri,
+ )
+ self.context.namespaces[key] = ns
+ return ns
def get_template(self, uri):
"""Return a :class:`.Template` from the given ``uri``.