From 8c283dc8a0d23f36ac19200c2388aa4b08a90a46 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Wed, 8 Mar 2017 19:55:56 +0200 Subject: [PATCH] Inform about broken manifest while loading it // Resolve #899 --- platformio/util.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/platformio/util.py b/platformio/util.py index 20d6214a..4d345830 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -162,8 +162,12 @@ def singleton(cls): def load_json(file_path): - with open(file_path, "r") as f: - return json.load(f) + try: + with open(file_path, "r") as f: + return json.load(f) + except ValueError: + raise exception.PlatformioException("Could not load broken JSON: %s" % + file_path) def get_systype():