jscheffl commented on code in PR #53553:
URL: https://github.com/apache/airflow/pull/53553#discussion_r2217687665
##########
airflow-ctl/src/airflowctl/ctl/commands/version_command.py:
##########
@@ -25,7 +25,11 @@
@provide_api_client(kind=ClientKind.CLI)
def version_info(arg, api_client=NEW_API_CLIENT):
"""Get version information."""
- version_response = api_client.version.get()
- version_dict = version_response.model_dump()
- version_dict["airflowctl_version"] = airflowctl_version
- rich.print(version_dict)
+ try:
+ version_response = api_client.version.get()
+ version_dict = version_response.model_dump()
+ version_dict["airflowctl_version"] = airflowctl_version
Review Comment:
Some small nit: If you fill the dict with airflowctl version before
try/catch then this line is needed only once... and you can print the dict
directly.
--
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]