Skip to content

Commit b668276

Browse files
committed
Fix missing check for command name
1 parent e5abd14 commit b668276

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/guidellm/utils/default_group.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def resolve_command(self, ctx, args):
6868
cmd_name, cmd, args = super().resolve_command(ctx, args)
6969
if hasattr(ctx, "arg0"):
7070
args.insert(0, ctx.arg0)
71-
cmd_name = cmd.name
71+
if cmd is not None:
72+
cmd_name = cmd.name
7273
return cmd_name, cmd, args
7374

7475
def format_commands(self, ctx, formatter):
@@ -79,7 +80,7 @@ def format_commands(self, ctx, formatter):
7980
return super().format_commands(ctx, formatter)
8081

8182

82-
class DefaultCommandFormatter:
83+
class DefaultCommandFormatter(click.HelpFormatter):
8384
"""
8485
Wraps a formatter to edit the line for the default command to mark it
8586
with the specified mark string.

0 commit comments

Comments
 (0)