Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.

Commit 8494f29

Browse files
authored
Update _build_metrics in action_logging in airflow.utils.cli
to fix index errors when accessing a list.
1 parent 1d5668e commit 8494f29

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

airflow/utils/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def _build_metrics(func_name, namespace):
113113
sub_commands_to_check = {'users', 'connections'}
114114
sensitive_fields = {'-p', '--password', '--conn-password'}
115115
full_command = list(sys.argv)
116+
full_command.append("fake_value")
116117
if full_command[1] in sub_commands_to_check: # pylint: disable=too-many-nested-blocks
117118
for idx, command in enumerate(full_command):
118119
if command in sensitive_fields:

0 commit comments

Comments
 (0)