mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-04-01 03:00:13 -04:00
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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user