forked from peter/volvo2mqtt
Optimize vcc api key check
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
|
## v1.10.1
|
||||||
|
### 🚀 Features:
|
||||||
|
|
||||||
|
- Optimize logging for vcc-api-key check #238
|
||||||
|
|
||||||
## v1.10.0
|
## v1.10.0
|
||||||
### 🚀 Features:
|
### 🚀 Features:
|
||||||
|
|
||||||
- Remove unused multiplier options
|
- Remove unused multiplier options
|
||||||
|
|
||||||
### 🐛 Bug Fixes:
|
### 🐛 Bug Fixes:
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
name: "Volvo2Mqtt"
|
name: "Volvo2Mqtt"
|
||||||
description: "Volvo AAOS MQTT bridge"
|
description: "Volvo AAOS MQTT bridge"
|
||||||
version: "1.10.0"
|
version: "1.10.1"
|
||||||
slug: "volvo2mqtt"
|
slug: "volvo2mqtt"
|
||||||
init: false
|
init: false
|
||||||
url: "https://github.com/Dielee/volvo2mqtt"
|
url: "https://github.com/Dielee/volvo2mqtt"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
from config import settings
|
from config import settings
|
||||||
|
|
||||||
VERSION = "v1.10.0"
|
VERSION = "v1.10.1"
|
||||||
|
|
||||||
OAUTH_TOKEN_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
OAUTH_TOKEN_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
||||||
OAUTH_AUTH_URL = "https://volvoid.eu.volvocars.com/as/authorization.oauth2"
|
OAUTH_AUTH_URL = "https://volvoid.eu.volvocars.com/as/authorization.oauth2"
|
||||||
|
|||||||
+10
-2
@@ -311,9 +311,17 @@ def check_vcc_api_key(test_key, extended_until=None):
|
|||||||
logging.warning("VCCAPIKEY " + test_key + " is extended and will be reusable at: "
|
logging.warning("VCCAPIKEY " + test_key + " is extended and will be reusable at: "
|
||||||
+ format_datetime(extended_until, format="medium", locale=settings["babelLocale"]))
|
+ format_datetime(extended_until, format="medium", locale=settings["babelLocale"]))
|
||||||
else:
|
else:
|
||||||
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
if "error" in data:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
||||||
|
else:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! Statuscode " + str(response.status_code) +
|
||||||
|
" Message: " + response.text)
|
||||||
else:
|
else:
|
||||||
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
if "error" in data:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
||||||
|
else:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! Statuscode " + str(response.status_code) +
|
||||||
|
" Message: " + response.text)
|
||||||
return True, extended_until
|
return True, extended_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user