Skip to content

Commit

Permalink
Fix --help exception when no docstrings or title/desc
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfield committed Jun 13, 2017
1 parent 2b3f6cd commit df0f0e4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions shellish/command/supplement.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,10 @@ def format_help(self):
title, about = '', desc
else:
title, about = self.description, ''
title = title.strip()
about = about.rstrip()
if title:
formatter.add_text('<b><u>%s</u></b>\n' % title)
formatter.add_text('<b><u>%s</u></b>\n' % title.strip())
if about:
formatter.add_text(about)
formatter.add_text(about.rstrip())
for group in self._action_groups:
formatter.start_section(group.title)
formatter.add_text(group.description)
Expand Down

0 comments on commit df0f0e4

Please sign in to comment.