This is an automated email from the ASF dual-hosted git repository.
henry3260 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 6aa7cd9eba7 Remove no-op exception re-raise and parser override in
airflowctl (#70903)
6aa7cd9eba7 is described below
commit 6aa7cd9eba7ce3af07c2ab18cc43b32c6b2aec7c
Author: rjgoyln <[email protected]>
AuthorDate: Sat Aug 1 22:08:20 2026 +0800
Remove no-op exception re-raise and parser override in airflowctl (#70903)
---
airflow-ctl/src/airflowctl/api/client.py | 3 ---
airflow-ctl/src/airflowctl/ctl/cli_config.py | 4 ----
2 files changed, 7 deletions(-)
diff --git a/airflow-ctl/src/airflowctl/api/client.py
b/airflow-ctl/src/airflowctl/api/client.py
index 65f90302868..51e92d81375 100644
--- a/airflow-ctl/src/airflowctl/api/client.py
+++ b/airflow-ctl/src/airflowctl/api/client.py
@@ -67,7 +67,6 @@ from airflowctl.exceptions import (
AirflowCtlCredentialNotFoundException,
AirflowCtlException,
AirflowCtlKeyringException,
- AirflowCtlNotFoundException,
)
if TYPE_CHECKING:
@@ -517,8 +516,6 @@ def get_client(
kind=kind,
)
yield api_client
- except AirflowCtlNotFoundException as e:
- raise e
finally:
if api_client:
api_client.close()
diff --git a/airflow-ctl/src/airflowctl/ctl/cli_config.py
b/airflow-ctl/src/airflowctl/ctl/cli_config.py
index c3057099dd8..787a53ce074 100755
--- a/airflow-ctl/src/airflowctl/ctl/cli_config.py
+++ b/airflow-ctl/src/airflowctl/ctl/cli_config.py
@@ -111,10 +111,6 @@ def safe_call_command(function: Callable, args:
Iterable[Arg]) -> None:
class DefaultHelpParser(argparse.ArgumentParser):
"""CustomParser to display help message."""
- def _check_value(self, action, value):
- """Override _check_value and check conditionally added command."""
- super()._check_value(action, value)
-
def error(self, message):
"""Override error and use print_help instead of print_usage."""
self.print_help()