diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-30 15:03:04 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2013-01-30 15:03:04 +0100 |
commit | 04453ccf422539a2f5752a83084cfac7a8c701ee (patch) | |
tree | b7c555f914912a4689528ed708e687f95c0a096f /mediagoblin/tools/template.py | |
parent | 3f931680e361086508d24d357f3d4d44466164bf (diff) | |
download | mediagoblin-04453ccf422539a2f5752a83084cfac7a8c701ee.tar.lz mediagoblin-04453ccf422539a2f5752a83084cfac7a8c701ee.tar.xz mediagoblin-04453ccf422539a2f5752a83084cfac7a8c701ee.zip |
Better Py3 compat: d.has_key(k) -> k in d
py3 does not have dict.has_key any more. You have to use
"key in dict" instead. As that works in python2 as well,
let's use that.
Also some small bits of pep8.
Diffstat (limited to 'mediagoblin/tools/template.py')
-rw-r--r-- | mediagoblin/tools/template.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mediagoblin/tools/template.py b/mediagoblin/tools/template.py index d9c6e654..6e01a7dd 100644 --- a/mediagoblin/tools/template.py +++ b/mediagoblin/tools/template.py @@ -40,7 +40,7 @@ def get_jinja_env(template_loader, locale): # If we have a jinja environment set up with this locale, just # return that one. - if SETUP_JINJA_ENVS.has_key(locale): + if locale in SETUP_JINJA_ENVS: return SETUP_JINJA_ENVS[locale] # jinja2.StrictUndefined will give exceptions on references |