Commit 30ce4303 by jkleint

Service module crashes if args has no "=".

parent 49c3ee90
......@@ -37,9 +37,12 @@ if not len(items):
sys.exit(1)
params = {}
for x in items:
(k, v) = x.split("=")
params[k] = v
for arg in items:
if "=" not in arg:
print json.dumps(dict(failed=True, msg='expected arguments of the form name=value'))
sys.exit(1)
(name, value) = arg.split("=")
params[name] = value
name = params['name']
state = params.get('state','unknown')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment