Merge pull request #226 from caryoscelus/drop-py35

Drop attempts at py<3.6 compatibility
This commit is contained in:
caryoscelus 2023-07-30 10:08:15 +00:00 committed by GitHub
commit a209f6a956
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions

View file

@ -928,10 +928,7 @@ class ContentManager(object):
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:

View file

@ -377,10 +377,7 @@ class Db(object):
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 = {}