Make format_description handle None 54/95054/1
authorAndrew Gauld <agauld@att.com>
Thu, 5 Sep 2019 13:04:52 +0000 (13:04 +0000)
committerAndrew Gauld <agauld@att.com>
Thu, 5 Sep 2019 14:34:07 +0000 (14:34 +0000)
Change-Id: I81f3158bca00ae78ba5f2ea733c09ffd3758bbe0
Issue-ID: DCAEGEN2-1723
Signed-off-by: Andrew Gauld <agauld@att.com>
dcae-cli/ChangeLog.md
dcae-cli/dcae_cli/_version.py
dcae-cli/dcae_cli/commands/util.py
dcae-cli/pom.xml

index 707e9a8..0780df4 100644 (file)
@@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/) 
 and this project adheres to [Semantic Versioning](http://semver.org/).
 
+## [2.11.4]
+
+* Fix format_description to handle no description case
 ## [2.11.3]
 
 * Fix Format class definition of "description" to match JSON schema
index 5f3d51b..5c4f3cc 100644 (file)
@@ -19,4 +19,4 @@
 # ECOMP is a trademark and service mark of AT&T Intellectual Property.
 
 # -*- coding: utf-8 -*-
-__version__ = "2.11.3"
+__version__ = "2.11.4"
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()
index bfc1b6f..7d19044 100644 (file)
@@ -27,7 +27,7 @@ limitations under the License.
   <groupId>org.onap.dcaegen2.platform.cli</groupId>
   <artifactId>dcae-cli</artifactId>
   <name>dcaegen2-platform-cli-dcae-cli</name>
-  <version>2.11.3</version>
+  <version>2.11.4</version>
   <url>http://maven.apache.org</url>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>