Skip to content

Commit

Permalink
Add 'get' constant
Browse files Browse the repository at this point in the history
  • Loading branch information
jpeimer committed Oct 10, 2024
1 parent d53f234 commit f5e4d24
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ def main(
)
sys.exit(1)

GET_ACTION = "get"

actions_dict: Dict[str, Any] = {
"get": get_resources,
GET_ACTION: get_resources,
"yaml": print_resource_yaml,
"logs": get_logs,
"describe": get_describe,
Expand Down Expand Up @@ -133,8 +135,8 @@ def main(
print_yaml = False
yaml_flag = "-oyaml"
if yaml_flag in commands_list:
if action_name != "get":
CONSOLE.print(f"{yaml_flag} is only supported with 'get' action")
if action_name != GET_ACTION:
CONSOLE.print(f"'{yaml_flag}' is only supported with '{GET_ACTION}' action")
continue
print_yaml = True
commands_list.remove(yaml_flag)
Expand Down

0 comments on commit f5e4d24

Please sign in to comment.