Python mako.exceptions.NameConflictError() Examples
The following are 15
code examples of mako.exceptions.NameConflictError().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
mako.exceptions
, or try the search function
.
Example #1
Source File: runtime.py From misp42splunk with GNU Lesser General Public License v3.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #2
Source File: runtime.py From misp42splunk with GNU Lesser General Public License v3.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #3
Source File: runtime.py From jbox with MIT License | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names))
Example #4
Source File: runtime.py From teleport with Apache License 2.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names))
Example #5
Source File: runtime.py From teleport with Apache License 2.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #6
Source File: runtime.py From teleport with Apache License 2.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #7
Source File: runtime.py From mako with MIT License | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #8
Source File: test_template.py From mako with MIT License | 5 votes |
def test_names_on_context(self): for name in ("context", "loop", "UNDEFINED", "STOP_RENDERING"): assert_raises_message( exceptions.NameConflictError, r"Reserved words passed to render\(\): %s" % name, Template("x").render, **{name: "foo"} )
Example #9
Source File: test_template.py From mako with MIT License | 5 votes |
def test_names_in_template(self): for name in ("context", "loop", "UNDEFINED", "STOP_RENDERING"): assert_raises_message( exceptions.NameConflictError, r"Reserved words declared in template: %s" % name, Template, "<%% %s = 5 %%>" % name, )
Example #10
Source File: runtime.py From SA-ctf_scoreboard with Creative Commons Zero v1.0 Universal | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names))
Example #11
Source File: test_template.py From docassemble with MIT License | 5 votes |
def test_names_on_context(self): for name in ('context', 'loop', 'UNDEFINED', 'STOP_RENDERING'): assert_raises_message( exceptions.NameConflictError, r"Reserved words passed to render\(\): %s" % name, Template("x").render, **{name:'foo'} )
Example #12
Source File: test_template.py From docassemble with MIT License | 5 votes |
def test_names_in_template(self): for name in ('context', 'loop', 'UNDEFINED', 'STOP_RENDERING'): assert_raises_message( exceptions.NameConflictError, r"Reserved words declared in template: %s" % name, Template, "<%% %s = 5 %%>" % name )
Example #13
Source File: runtime.py From Tautulli with GNU General Public License v3.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names) )
Example #14
Source File: runtime.py From ansible-cmdb with GNU General Public License v3.0 | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names))
Example #15
Source File: runtime.py From android_universal with MIT License | 5 votes |
def _set_with_template(self, t): self._with_template = t illegal_names = t.reserved_names.intersection(self._data) if illegal_names: raise exceptions.NameConflictError( "Reserved words passed to render(): %s" % ", ".join(illegal_names))