diff --git a/.lgtm.yml b/.lgtm.yml new file mode 100644 index 00000000..da28dfc1 --- /dev/null +++ b/.lgtm.yml @@ -0,0 +1,5 @@ +--- +extraction: + python: + python_setup: + version: 2 diff --git a/library/blivet.py b/library/blivet.py index d671d09b..3b649213 100644 --- a/library/blivet.py +++ b/library/blivet.py @@ -127,7 +127,7 @@ class BlivetAnsibleError(Exception): pass -class BlivetVolume: +class BlivetVolume(object): def __init__(self, blivet_obj, volume, bpool=None): self._blivet = blivet_obj self._volume = volume @@ -369,7 +369,7 @@ def _get_blivet_volume(blivet_obj, volume, bpool=None): return _BLIVET_VOLUME_TYPES[volume_type](blivet_obj, volume, bpool=bpool) -class BlivetPool: +class BlivetPool(object): def __init__(self, blivet_obj, pool): self._blivet = blivet_obj self._pool = pool diff --git a/library/lvm_gensym.py b/library/lvm_gensym.py index fc08c732..49d1822b 100644 --- a/library/lvm_gensym.py +++ b/library/lvm_gensym.py @@ -43,16 +43,10 @@ RETURN = ''' vg_name: description: The default generated name for an unspecified volume group - type: str -''' - -RETURN = ''' -vg_name: - description: The default generated name for an unspecified volume group - type: str + type: str lv_name: - description: The default generated name for an unspecified logical volume + description: The default generated name for an unspecified logical volume type: str ''' diff --git a/library/resolve_blockdev.py b/library/resolve_blockdev.py index 904f726e..007bb28e 100644 --- a/library/resolve_blockdev.py +++ b/library/resolve_blockdev.py @@ -82,7 +82,7 @@ def _get_dm_name_from_kernel_dev(kdev): def _get_md_name_from_kernel_dev(kdev): minor = os.minor(os.stat(kdev).st_rdev) return next(name for name in os.listdir(DEV_MD) - if os.minor(os.stat("%/%s" % (DEV_MD, name).st_rdev) == minor)) + if os.minor(os.stat("%s/%s" % (DEV_MD, name)).st_rdev) == minor) def canonical_device(device):