lvm2/lvm2-2_02_172-lvmdbusd-mangling-config.patch
2017-05-17 17:07:19 +02:00

16 lines
581 B
Diff

diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
index af9e10a..170824d 100644
--- a/daemons/lvmdbusd/utils.py
+++ b/daemons/lvmdbusd/utils.py
@@ -519,7 +519,9 @@ def add_no_notify(cmdline):
if '--config' in cmdline:
for i, arg in enumerate(cmdline):
if arg == '--config':
- cmdline[i] += "global/notify_dbus=0"
+ if len(cmdline) <= i+1:
+ raise dbus.exceptions.DBusException("Missing value for --config option.")
+ cmdline[i+1] += " global/notify_dbus=0"
break
else:
cmdline.extend(['--config', 'global/notify_dbus=0'])