make it works for python 2.6

This commit is contained in:
Xavier Barbosa 2013-07-19 17:19:05 +02:00
parent 11ef87bd5d
commit 3adfc0f46b

View File

@ -176,7 +176,7 @@ class SerializerExtension(Extension, object):
try:
return yaml.load(value)
except AttributeError:
raise TemplateRuntimeError("Unable to load yaml from {}".format(value))
raise TemplateRuntimeError("Unable to load yaml from {0}".format(value))
def load_json(self, value):
if isinstance(value, TemplateModule):
@ -184,7 +184,7 @@ class SerializerExtension(Extension, object):
try:
return json.loads(value)
except (ValueError, TypeError):
raise TemplateRuntimeError("Unable to load json from {}".format(value))
raise TemplateRuntimeError("Unable to load json from {0}".format(value))
def parse(self, parser):
if parser.stream.current.value == "import_yaml":