Code Review
/
dcaegen2
/
platform
/
cli.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Make format_description handle None
[dcaegen2/platform/cli.git]
/
dcae-cli
/
dcae_cli
/
commands
/
util.py
diff --git
a/dcae-cli/dcae_cli/commands/util.py
b/dcae-cli/dcae_cli/commands/util.py
index
9f758e2
..
bc0fea3
100644
(file)
--- 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.
"""
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()
lines = textwrap.wrap(description)
lines = lines[:num_lines]
last_line = lines.pop()