mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
handle incorrect commands w/o '=' slightly better
This commit is contained in:
parent
2df6399176
commit
254f98bdf5
1 changed files with 5 additions and 3 deletions
|
@ -194,9 +194,7 @@ class Virt(object):
|
|||
"nrVirtCpu" : data[3],
|
||||
"cpuTime" : str(data[4]),
|
||||
}
|
||||
thisvm = self.conn.find_vm(vm)
|
||||
if hasattr(thisvm, 'autostart'):
|
||||
info[vm]["autostart"] = thisvm.autostart()
|
||||
info[vm]["autostart"] = self.conn.get_autostart(vm)
|
||||
|
||||
return info
|
||||
|
||||
|
@ -378,6 +376,10 @@ def main():
|
|||
# command=[some command] [guest=name]
|
||||
|
||||
params = {}
|
||||
if '=' not in args:
|
||||
msg = "No proper arguments provided to virt module: %s" % args
|
||||
return VIRT_FAILED, msg
|
||||
|
||||
for x in items:
|
||||
(k, v) = x.split("=")
|
||||
params[k] = v
|
||||
|
|
Loading…
Reference in a new issue