From: noah morrison Date: Sat, 8 Nov 2014 02:59:08 +0000 (-0500) Subject: get_key now defaults to '' X-Git-Url: https://git.devinivas.org/?a=commitdiff_plain;h=7e5d78e853a5fa17722a382b51e77ce9fb565724;p=chevron.git get_key now defaults to '' Instead of return None, get_key now returns an empty string. Also wrapped get_key calls in str --- diff --git a/entei.py b/entei.py index 4a85755..3a3414d 100755 --- a/entei.py +++ b/entei.py @@ -171,6 +171,7 @@ def render(template, data, partials_path='.', partials_ext='mustache', return scope except (TypeError, KeyError): pass + return '' def get_partial(name): try: @@ -201,10 +202,10 @@ def render(template, data, partials_path='.', partials_ext='mustache', output += key elif tag == 'variable': - output += html_escape(get_key(key)) + output += html_escape(str(get_key(key))) elif tag == 'no escape': - output += get_key(key) + output += str(get_key(key)) elif tag == 'section': scope = get_key(key)