mirror of
https://github.com/beetbox/beets.git
synced 2026-01-27 02:23:36 +01:00
Don't blow up if a subcommand has no help string.
This commit is contained in:
parent
5f3c27990d
commit
0f4b454c20
1 changed files with 2 additions and 1 deletions
|
|
@ -989,7 +989,8 @@ class SubcommandsOptionParser(CommonOptionsParser):
|
|||
result.append(name)
|
||||
help_width = formatter.width - help_position
|
||||
help_lines = textwrap.wrap(subcommand.help, help_width)
|
||||
result.append("%*s%s\n" % (indent_first, "", help_lines[0]))
|
||||
help_line = help_lines[0] if help_lines else ''
|
||||
result.append("%*s%s\n" % (indent_first, "", help_line))
|
||||
result.extend(["%*s%s\n" % (help_position, "", line)
|
||||
for line in help_lines[1:]])
|
||||
formatter.dedent()
|
||||
|
|
|
|||
Loading…
Reference in a new issue