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

@@ -281,15 +281,10 @@ class DigitalBitbox_Client(HardwareClientBase):
if not dbb_user_dir:
return
try:
# Python 3.5+
jsonDecodeError = json.JSONDecodeError
except AttributeError:
jsonDecodeError = ValueError
try:
with open(os.path.join(dbb_user_dir, "config.dat")) as f:
dbb_config = json.load(f)
except (FileNotFoundError, jsonDecodeError):
except (FileNotFoundError, json.JSONDecodeError):
return
if ENCRYPTION_PRIVKEY_KEY not in dbb_config or CHANNEL_ID_KEY not in dbb_config: