1
0

rm some legacy cruft for old python versions

This commit is contained in:
SomberNight
2024-06-05 14:55:48 +00:00
parent 982443eaa3
commit 13e2949088
4 changed files with 5 additions and 15 deletions

View File

@@ -1123,8 +1123,7 @@ def read_json_file(path):
try:
with open(path, 'r', encoding='utf-8') as f:
data = json.loads(f.read())
#backwards compatibility for JSONDecodeError
except ValueError:
except json.JSONDecodeError:
_logger.exception('')
raise FileImportFailed(_("Invalid JSON code."))
except BaseException as e: