** Description changed:

  >>> import tempita
  >>> tmp = tempita.HTMLTemplate('{{asd|html}} asdasd')
  >>> c = tempita.bunch(asd='<12>')
  >>> c.default = None
  >>> body = tmp.substitute(c)
  Traceback (most recent call last):
-   File "<stdin>", line 1, in <module>
-   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 173, in 
substitute
-     result, defs, inherit = self._interpret(ns)
-   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 184, in 
_interpret
-     self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
-   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 212, in 
_interpret_codes
-     self._interpret_code(item, ns, out, defs)
-   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 235, in 
_interpret_code
-     base = func(base)
+   File "<stdin>", line 1, in <module>
+   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 173, in 
substitute
+     result, defs, inherit = self._interpret(ns)
+   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 184, in 
_interpret
+     self._interpret_codes(self._parsed, ns, out=parts, defs=defs)
+   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 212, in 
_interpret_codes
+     self._interpret_code(item, ns, out, defs)
+   File "/usr/lib/python3/dist-packages/tempita/__init__.py", line 235, in 
_interpret_code
+     base = func(base)
  TypeError: 'NoneType' object is not callable
  
  Using hack:
  >>> import tempita
  >>> tmp = tempita.HTMLTemplate('{{asd|html}} asdasd')
  >>> c = tempita.bunch(asd='<12>')
  >>> c.default = None
+ >>> c.update(tempita.HTMLTemplate.default_namespace)
  >>> body = tmp.substitute(c)
  >>> print(body)
  <12> asdasd

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/982327

Title:
  strange behavior of the bunch

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-tempita/+bug/982327/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to