If missing state or name or list parameter on yum module, raise error explaining what is up.
This commit is contained in:
parent
043815a6e6
commit
1cfc35de6b
1 changed files with 4 additions and 0 deletions
4
yum
4
yum
|
@ -329,6 +329,10 @@ def main():
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
return 1, str(e)
|
return 1, str(e)
|
||||||
|
|
||||||
|
else:
|
||||||
|
print json.dumps(dict(failed=True, msg='invalid module parameters'))
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
print json.dumps(results)
|
print json.dumps(results)
|
||||||
return 0, None
|
return 0, None
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue