bugraoz93 commented on code in PR #51414:
URL: https://github.com/apache/airflow/pull/51414#discussion_r2132654225


##########
airflow-ctl/src/airflowctl/api/client.py:
##########
@@ -134,23 +139,31 @@ def save(self):
             keyring.set_password("airflowctl", 
f"api_token-{self.api_environment}", self.api_token)
         except NoKeyringError as e:
             log.error(e)
+        except TypeError as e:
+            # This happens when the token is None, which is not allowed by 
keyring
+            if self.api_token is None and self.client_kind == ClientKind.CLI:
+                raise AirflowCtlCredentialNotFoundException("No API token 
found. Please login first.") from e
+            pass

Review Comment:
   Thanks for your review, Shahar! Indeed it is unnecessary addition there. 
Fixing it before merge



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to