storage: don't fail on import if lvm is not installed

This commit is contained in:
Marek Marczykowski-Górecki 2017-05-26 15:06:12 +02:00
parent e54cc11a2c
commit 7f3dd8b3d7
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -33,7 +33,7 @@ def check_lvm_version():
lvm_help = subprocess.check_output(['lvm', 'lvcreate', '--help'],
stderr=subprocess.DEVNULL).decode()
return '--setactivationskip' not in lvm_help
except subprocess.CalledProcessError:
except (subprocess.CalledProcessError, FileNotFoundError):
pass
lvm_is_very_old = check_lvm_version()