diff options
-rw-r--r-- | scripts/lib/bsp/engine.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/lib/bsp/engine.py b/scripts/lib/bsp/engine.py index 85f095ebcb..760efc7a60 100644 --- a/scripts/lib/bsp/engine.py +++ b/scripts/lib/bsp/engine.py @@ -1547,11 +1547,13 @@ def yocto_common_create(machine, target, scripts_path, layer_output_dir, codedum if properties_file: try: infile = open(properties_file, "r") + properties = json.load(infile) except IOError: print("Couldn't open properties file %s for reading, exiting" % properties_file) sys.exit(1) - - properties = json.load(infile) + except ValueError: + print("Wrong format on properties file %s, exiting" % properties_file) + sys.exit(1) if properties_str and not properties: properties = json.loads(properties_str) |