diff options
author | Andrew Gauld <agauld@att.com> | 2019-09-05 13:04:52 +0000 |
---|---|---|
committer | Andrew Gauld <agauld@att.com> | 2019-09-05 14:34:07 +0000 |
commit | 29ad7fa376071dd775072387c1cc76be61688e81 (patch) | |
tree | 99122609dda2fc6b9c9b0099dcbc085796f998d6 /dcae-cli/dcae_cli/commands | |
parent | 85fe98b96d6097369a107b7df79f75c0c2a10bc0 (diff) |
Make format_description handle None
Change-Id: I81f3158bca00ae78ba5f2ea733c09ffd3758bbe0
Issue-ID: DCAEGEN2-1723
Signed-off-by: Andrew Gauld <agauld@att.com>
Diffstat (limited to 'dcae-cli/dcae_cli/commands')
-rw-r--r-- | dcae-cli/dcae_cli/commands/util.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/dcae-cli/dcae_cli/commands/util.py b/dcae-cli/dcae_cli/commands/util.py index 9f758e2..bc0fea3 100644 --- a/dcae-cli/dcae_cli/commands/util.py +++ b/dcae-cli/dcae_cli/commands/util.py @@ -80,6 +80,8 @@ def format_description(description, line_width=50, num_lines=3): of lines. The last line trails with ".." if the text still overflows to signal that there is more. """ + if not description: + return '' lines = textwrap.wrap(description) lines = lines[:num_lines] last_line = lines.pop() |