generate_headers.py gives slightly more useful output if JSON fluid file cannot be decoded

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
This commit is contained in:
Ian Bell
2014-08-21 00:48:38 +02:00
parent b4b24ae1a3
commit 3c3ffa66c4

View File

@@ -220,6 +220,8 @@ def combine_json(root_dir):
# Load the fluid file
fluid = json.load(open(file, 'r'))
except ValueError:
print('"python -mjson.tool '+file+'" returns ->', end='')
subprocess.call('python -mjson.tool '+file, shell = True)
raise ValueError('unable to decode file %s' % file)
master += [fluid]