summaryrefslogtreecommitdiff
path: root/cinderclient/utils.py
diff options
context:
space:
mode:
authoryatin karel <yatin.karel@nectechnologies.in>2015-03-16 23:26:12 +0530
committeryatin karel <yatin.karel@nectechnologies.in>2015-03-16 23:26:22 +0530
commit0f73c5fb8ab593da7e332ade273e7da31ea8e303 (patch)
treec3d72aa2b0fb74ddcc8542452090d640ae69f4fa /cinderclient/utils.py
parentf47f973d9b15599983224c05c1408ee723236ea2 (diff)
downloadpython-cinderclient-0f73c5fb8ab593da7e332ade273e7da31ea8e303.tar.gz
cinder list now prints dash '-' when data is None
cinder list used to print None when volume was created without name. Now it prints '-' dash when display_name is None Closes-Bug: #1422244 Change-Id: I195ccc37fe96dbb54a0460527fabf55146170bc7
Diffstat (limited to 'cinderclient/utils.py')
-rw-r--r--cinderclient/utils.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cinderclient/utils.py b/cinderclient/utils.py
index fcf9f68..330d52d 100644
--- a/cinderclient/utils.py
+++ b/cinderclient/utils.py
@@ -139,6 +139,8 @@ def print_list(objs, fields, formatters=None, sortby_index=0):
data = o[field]
else:
data = getattr(o, field_name, '')
+ if data is None:
+ data = '-'
row.append(data)
pt.add_row(row)