mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
make it works for python 2.6
This commit is contained in:
parent
11ef87bd5d
commit
3adfc0f46b
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user