mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 09:26:16 +00:00
fix: #1041
This commit is contained in:
committed by
Florian BEZANNIER
parent
c6b87f63e4
commit
83ef3d6a57
@@ -55,8 +55,13 @@ class InitialSetup:
|
||||
)},
|
||||
timeout=TIMEOUT_IN_S
|
||||
)
|
||||
|
||||
self.token = res.json()["accessToken"]
|
||||
data = res.json()
|
||||
if token := data.get("accessToken"):
|
||||
self.token = token
|
||||
else:
|
||||
raise ConnectionError("No access token in response:", res.text)
|
||||
except ConnectionError as e:
|
||||
raise e
|
||||
except Exception as ex:
|
||||
msg = traceback.format_exc() + f"\nHOST_BRANDID : {apk_parser.host_brandid_prod} " \
|
||||
f"sitecode: {apk_parser.site_code}"
|
||||
|
||||
Reference in New Issue
Block a user