Commit 1d3fe77b authored by Łukasz Nowak's avatar Łukasz Nowak

Inform in case of malformed json.

parent 81203b2e
......@@ -57,6 +57,9 @@ class Recipe(GenericSlapRecipe):
known_tid_storage_identifier_dict = {}
snippet_zeo = open(self.options['snippet-zeo']).read()
for zeo_id, zeo_configuration_list in json_data['zeo'].iteritems():
if not type(zeo_configuration_list) in (type([]), type(set()), type(())):
raise ValueError('%s passed in json is not a list, json: %s.' % (
zeo_configuration_list, json_data))
storage_list = []
a = storage_list.append
for zeo_slave in zeo_configuration_list:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment