lvm2/lvm2-2_02_172-lvmdbusd-mangling-config.patch

16 lines
581 B
Diff
Raw Normal View History

2017-05-17 15:07:19 +00:00
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'])