diff --git a/library/ceph_volume.py b/library/ceph_volume.py index f99c76309..a6605f3a5 100644 --- a/library/ceph_volume.py +++ b/library/ceph_volume.py @@ -446,11 +446,12 @@ def is_lv(module, vg, lv, container_image): rc, cmd, out, err = exec_command(module, cmd) - result = json.loads(out)['report'][0]['lv'] - if rc == 0 and len(result) > 0: - return True - else: - return False + if rc == 0: + result = json.loads(out)['report'][0]['lv'] + if len(result) > 0: + return True + + return False def zap_devices(module, container_image):