diff --git a/src/Content/ContentManager.py b/src/Content/ContentManager.py index bcf96c0b7..a06ba523f 100644 --- a/src/Content/ContentManager.py +++ b/src/Content/ContentManager.py @@ -928,10 +928,7 @@ def verifyFile(self, inner_path, file, ignore_same=True): new_content = file else: 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) + new_content = json.load(file) except Exception as err: raise VerifyError(f"Invalid json file: {err}") if inner_path in self.contents: diff --git a/src/Db/Db.py b/src/Db/Db.py index 3d4b6d7da..6ee3a9779 100644 --- a/src/Db/Db.py +++ b/src/Db/Db.py @@ -377,10 +377,7 @@ def updateJson(self, file_path, file=None, cur=None): if file_path.endswith("json.gz"): file = helper.limitedGzipFile(fileobj=file) - if sys.version_info.major == 3 and sys.version_info.minor < 6: - data = json.loads(file.read().decode("utf8")) - else: - data = json.load(file) + data = json.load(file) except Exception as err: self.log.debug("Json file %s load error: %s" % (file_path, err)) data = {}