Skip to content

Commit

Permalink
backwards-compatibility bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsw committed Apr 14, 2010
1 parent a8040e3 commit 7164402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,6 @@ class Render:
def __init__(self, loc='templates', cache=None, base=None, **keywords):
self._loc = loc
self._keywords = keywords
if 'globals' not in self._keywords: self._keywords['globals'] = {}

if cache is None:
cache = not config.get('debug', False)
Expand All @@ -986,6 +985,7 @@ def __init__(self, loc='templates', cache=None, base=None, **keywords):

def _add_global(self, obj, name=None):
"""Add a global to this rendering instance."""
if 'globals' not in self._keywords: self._keywords['globals'] = {}
if not name:
name = obj.__name__
self._keywords['globals'][name] = obj
Expand Down

0 comments on commit 7164402

Please sign in to comment.