diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index 7ef7e54e..81b5c0e1 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -936,10 +936,13 @@ class ContentManager(object): if type(file) is dict: new_content = file else: - if sys.version_info.major == 3 and sys.version_info.minor < 6: - new_content = json.loads(file.read().decode("utf8")) - else: - new_content = json.load(file) + try: + if sys.version_info.major == 3 and sys.version_info.minor < 6: + new_content = json.loads(file.read().decode("utf8")) + else: + new_content = json.load(file) + except Exception as err: + raise VerifyError("Invalid json file: %s" % err) if inner_path in self.contents: old_content = self.contents.get(inner_path, {"modified": 0}) # Checks if its newer the ours