Skip to content

Commit

Permalink
ceph-volume lvm.listing only include devices if they exist
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Deza <[email protected]>
  • Loading branch information
Alfredo Deza committed Jul 18, 2018
1 parent ffa86bc commit 37565f8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/ceph-volume/ceph_volume/devices/lvm/listing.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,15 @@ def pretty_report(report):
value=value
)
)
output.append(
device_metadata_item_template.format(tag_name='devices', value=','.join(device['devices'])))
if not device.get('devices'):
continue
else:
output.append(
device_metadata_item_template.format(
tag_name='devices',
value=','.join(device['devices'])
)
)

print(''.join(output))

Expand Down

0 comments on commit 37565f8

Please sign in to comment.