]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph-volume api.lvm return result of get_lv when using arguments
authorAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 12:48:01 +0000 (08:48 -0400)
committerAlfredo Deza <adeza@redhat.com>
Fri, 20 Oct 2017 16:10:07 +0000 (12:10 -0400)
If the argument is an absolute path it is fine to just return whatever
get_lv finds since it is a "safe" call, it will return a None if nothing
is found

Signed-off-by: Alfredo Deza <adeza@redhat.com>
src/ceph-volume/ceph_volume/api/lvm.py

index 110e990071f85518f55f867a813c55994cfba6d3..05f6cb2f07b5c45720001d18889981d79cb9d2b4 100644 (file)
@@ -139,8 +139,7 @@ def get_lv_from_argument(argument):
     """
     if argument.startswith('/'):
         lv = get_lv(lv_path=argument)
-        if lv:
-            return lv
+        return lv
     try:
         vg_name, lv_name = argument.split('/')
     except (ValueError, AttributeError):