diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 12:01:12 -0500 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-02-20 12:01:12 -0500 |
commit | cb9ebd2288031c96dda349a8eb42bf6bacbec8f1 (patch) | |
tree | 9aff8978129a13f9b861df6a5846a2b9a41cbda4 /mako/parsetree.py | |
parent | cff83675deb802e8c2aa78c98dc0e1ce4a179ac1 (diff) | |
download | mako-cb9ebd2288031c96dda349a8eb42bf6bacbec8f1.tar.gz |
got all tests to pass again
Diffstat (limited to 'mako/parsetree.py')
-rw-r--r-- | mako/parsetree.py | 11 |
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 [] |