@@ -522,7 +522,9 @@ def _get_api_token_data(self, apitoken) -> tuple[str | None, list | None]:
522522 "apirequest:mist_post:Connection Error: %s" , connexion_error
523523 )
524524 CONSOLE .critical ("Connexion error...\r \n " )
525- raise ConnectionError (f"Connection error: { connexion_error } " ) from connexion_error
525+ raise ConnectionError (
526+ f"Connection error: { connexion_error } "
527+ ) from connexion_error
526528 except Exception :
527529 LOGGER .error (
528530 "apisession:_get_api_token_data:"
@@ -546,7 +548,9 @@ def _get_api_token_data(self, apitoken) -> tuple[str | None, list | None]:
546548 CONSOLE .critical (
547549 f"Invalid API Token { apitoken [:4 ]} ...{ apitoken [- 4 :]} : status code { data .status_code } \r \n "
548550 )
549- raise ValueError (f"Invalid API Token { apitoken [:4 ]} ...{ apitoken [- 4 :]} : status code { data .status_code } " )
551+ raise ValueError (
552+ f"Invalid API Token { apitoken [:4 ]} ...{ apitoken [- 4 :]} : status code { data .status_code } "
553+ )
550554
551555 if data_json .get ("email" ):
552556 token_type = "user" # nosec bandit B105
@@ -700,7 +704,9 @@ def _process_login(self, retry: bool = True) -> str | None:
700704 "apirequest:mist_post:Connection Error: %s" , connexion_error
701705 )
702706 CONSOLE .critical ("Connexion error...\r \n " )
703- raise ConnectionError (f"Connection error: { connexion_error } " ) from connexion_error
707+ raise ConnectionError (
708+ f"Connection error: { connexion_error } "
709+ ) from connexion_error
704710 except Exception :
705711 LOGGER .error ("apisession:_process_login:Exception occurred" , exc_info = True )
706712 error = "Exception occurred during authentication"
0 commit comments