From 9bcf2aeaf582dc8ea16edc009e570e4c31dd5eae Mon Sep 17 00:00:00 2001 From: 0x3d Date: Wed, 7 Feb 2024 01:17:44 +0100 Subject: [PATCH] Linters don't code --- psa_car_controller/psa/oauth.py | 5 +++-- psa_car_controller/psacc/application/psa_client.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/psa_car_controller/psa/oauth.py b/psa_car_controller/psa/oauth.py index 07eee23..900636d 100644 --- a/psa_car_controller/psa/oauth.py +++ b/psa_car_controller/psa/oauth.py @@ -41,10 +41,11 @@ class OpenIdCredentialManager(CredentialManager): url = self.generate_authorize_url(redir_uri, secrets.token_urlsafe(16), code_challenge=code_challenge, code_challenge_method="S256") + logger.info("Now login to this URL in a browser: %s", url) + ret = "" while len(ret) != 36: - logger.info("Now login to this URL in a browser: %s", url) - ret = input("\nCopy+paste the resulting mymop-code (in F12 > Network" \ + ret = input("\nCopy+paste the resulting mymop-code (in F12 > Network, " \ "when you hit the final OK button, 36 chars, UUID format): ") self._token_request({ "grant_type": 'authorization_code', "code": ret, diff --git a/psa_car_controller/psacc/application/psa_client.py b/psa_car_controller/psacc/application/psa_client.py index dbd47b1..e9a9ef2 100644 --- a/psa_car_controller/psacc/application/psa_client.py +++ b/psa_car_controller/psacc/application/psa_client.py @@ -32,7 +32,7 @@ logger = CustomLogger.getLogger(__name__) class PSAClient: def connect(self, country_code): - self.manager.init_with_user_credentials_realm(country_code, self.realm) + self.manager.init_with_user_credentials_realm(country_code) # pylint: disable=too-many-arguments def __init__(self, refresh_token, client_id, client_secret, remote_refresh_token, customer_id, realm, country_code,