summaryrefslogtreecommitdiff
path: root/mako/parsetree.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2011-02-20 12:01:12 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2011-02-20 12:01:12 -0500
commitcb9ebd2288031c96dda349a8eb42bf6bacbec8f1 (patch)
tree9aff8978129a13f9b861df6a5846a2b9a41cbda4 /mako/parsetree.py
parentcff83675deb802e8c2aa78c98dc0e1ce4a179ac1 (diff)
downloadmako-cb9ebd2288031c96dda349a8eb42bf6bacbec8f1.tar.gz
got all tests to pass again
Diffstat (limited to 'mako/parsetree.py')
-rw-r--r--mako/parsetree.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/mako/parsetree.py b/mako/parsetree.py
index 3ef85e6..53a980d 100644
--- a/mako/parsetree.py
+++ b/mako/parsetree.py
@@ -361,9 +361,14 @@ class NamespaceTag(Tag):
self.name = attributes.get('name', '__anon_%s' % hex(abs(id(self))))
if not 'name' in attributes and not 'import' in attributes:
raise exceptions.CompileException(
- "'name' and/or 'import' attributes are required "
- "for <%namespace>",
- **self.exception_kwargs)
+ "'name' and/or 'import' attributes are required "
+ "for <%namespace>",
+ **self.exception_kwargs)
+ if 'file' in attributes and 'module' in attributes:
+ raise exceptions.CompileException(
+ "<%namespace> may only have one of 'file' or 'module'",
+ **self.exception_kwargs
+ )
def declared_identifiers(self):
return []