Skip to content

Commit

Permalink
Fix --help for obj commands (#562)
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai authored Jan 5, 2024
1 parent 76dcce8 commit 3851c3f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions linodecli/plugins/obj/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,8 @@ def call(
"""
This is called when the plugin is invoked
"""
is_help = "--help" in args or "-h" in args

if not HAS_BOTO:
# we can't do anything - ask for an install
print(
Expand All @@ -540,7 +542,7 @@ def call(

sys.exit(2) # requirements not met - we can't go on

clusters = get_available_cluster(context.client)
clusters = get_available_cluster(context.client) if not is_help else None
parser = get_obj_args_parser(clusters)
parsed, args = parser.parse_known_args(args)

Expand All @@ -556,7 +558,7 @@ def call(
secret_key = None

# make a client, but only if we weren't printing help
if not "--help" in args:
if not is_help:
access_key, secret_key = get_credentials(context.client)

cluster = parsed.cluster
Expand Down

0 comments on commit 3851c3f

Please sign in to comment.