Permalink
Browse files

Fixed compatibility error when the jingo2.ext.i18n extension is not l…

…oaded.
  • Loading branch information...
1 parent b4ecca1 commit 8bdb9fc460c5294fc8922c05b6c35455a77c60e3 Charlie committed with coffindragger Nov 4, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 jingo/__init__.py
View
@@ -59,7 +59,8 @@ def get_env():
e = Environment(**opts)
# Install null translations since gettext isn't always loaded up during
# testing.
- e.install_null_translations()
+ if 'jinja2.ext.i18n' in e.extensions:
+ e.install_null_translations()
return e

0 comments on commit 8bdb9fc

Please sign in to comment.