From 867702b26a14bbf03da6799c69f74e8f65a66b33 Mon Sep 17 00:00:00 2001
From: Serge van Ginderachter <serge@vanginderachter.be>
Date: Fri, 4 Apr 2014 15:32:35 +0200
Subject: [PATCH] lvg module bugfix on vg_options patch

When no vg_options are passed to the module, 'vg_options' still exists
in the module.params dict with a value of None, so the default empty string in
the get method is never used. None cannot be "splitted", which backtraced.
---
 system/lvg | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/system/lvg b/system/lvg
index 906e13d6469..9879a3017cc 100644
--- a/system/lvg
+++ b/system/lvg
@@ -105,7 +105,7 @@ def main():
             vg=dict(required=True),
             pvs=dict(type='list'),
             pesize=dict(type='int', default=4),
-            vg_options=dict(),
+            vg_options=dict(default=''),
             state=dict(choices=["absent", "present"], default='present'),
             force=dict(type='bool', default='no'),
         ),
@@ -116,7 +116,7 @@ def main():
     state = module.params['state']
     force = module.boolean(module.params['force'])
     pesize = module.params['pesize']
-    vgoptions = module.params.get('vg_options', '').split()
+    vgoptions = module.params['vg_options'].split()
 
     if module.params['pvs']:
         dev_string = ' '.join(module.params['pvs'])