[master 13/21] If lvm is not available, do not do the filtering.
mulkieran
installerbot-noreply at redhat.com
Tue May 12 21:35:55 UTC 2015
From: mulhern <amulhern at redhat.com>
Related: #12
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devicelibs/lvm.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/blivet/devicelibs/lvm.py b/blivet/devicelibs/lvm.py
index 6366703..e781d1d 100644
--- a/blivet/devicelibs/lvm.py
+++ b/blivet/devicelibs/lvm.py
@@ -30,6 +30,7 @@
from ..size import Size
from ..i18n import N_
from ..flags import flags
+from ..tasks import availability
# some of lvm's defaults that we have no way to ask it for
LVM_PE_START = Size("1 MiB")
@@ -82,6 +83,9 @@ def _set_global_config():
blockdev.lvm.set_global_config(config_string)
def needs_config_refresh(fn):
+ if not availability.BLOCKDEV_LVM_PLUGIN.available:
+ return lambda *args, **kwargs: None
+
def fn_with_refresh(*args, **kwargs):
ret = fn(*args, **kwargs)
_set_global_config()
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/35f4b148775a68d776e2305cae4a89a4f7add22d
More information about the anaconda-patches
mailing list