Make format_description handle None
[dcaegen2/platform/cli.git] / dcae-cli / dcae_cli / commands / util.py
index 9f758e2..bc0fea3 100644 (file)
@@ -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()