Permalink
Browse files

Fixed a Python 3 bug.

--HG--
branch : trunk
  • Loading branch information...
mitsuhiko committed May 29, 2010
1 parent 5da3181 commit d1ef7e0f43aa0dfa41667da3186a4df28664002c
Showing with 3 additions and 0 deletions.
  1. +3 −0 jinja2/runtime.py
View
@@ -528,6 +528,9 @@ class StrictUndefined(Undefined):
__slots__ = ()
__iter__ = __unicode__ = __str__ = __len__ = __nonzero__ = __eq__ = \
__ne__ = Undefined._fail_with_undefined_error
+ if sys.version_info >= (3, 0):
+ __bool__ = __nonzero__
+ del __nonzero__
# remove remaining slots attributes, after the metaclass did the magic they

0 comments on commit d1ef7e0

Please sign in to comment.