summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2017-06-01 09:39:41 +0200
committerMarian Csontos <mcsontos@redhat.com>2017-06-01 09:39:41 +0200
commit115748d4916e20e3829fff6f72659de3c6459b9c (patch)
tree0c9d4956c4471323e6b9ea6c0e8a17bf7ed57359
parentb3306383ba7cf77399e88da3bf1ae5cde9b0eb43 (diff)
downloadlvm2-115748d4916e20e3829fff6f72659de3c6459b9c.tar.gz
dbus: Return DBus error on incorrect usage
-rw-r--r--daemons/lvmdbusd/vg.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/daemons/lvmdbusd/vg.py b/daemons/lvmdbusd/vg.py
index c00084d7d..0a80c24ea 100644
--- a/daemons/lvmdbusd/vg.py
+++ b/daemons/lvmdbusd/vg.py
@@ -237,6 +237,11 @@ class Vg(AutomatedProperties):
# If pv_object_paths is not empty, then get the device paths
if pv_object_paths and len(pv_object_paths) > 0:
+ if missing:
+ # FIXME: Shall this call cbe directly from Reduce?
+ raise dbus.exceptions.DBusException(
+ VG_INTERFACE,
+ 'Mixed missing and PVs usage!')
for pv_op in pv_object_paths:
pv = cfg.om.get_object_by_path(pv_op)
if pv: