mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 23:21:22 -07:00
VMware: fix return to return a tuple instead of a bool (#45764)
fixes "'bool' object is not iterable" exception when `res` is falsey
This commit is contained in:
parent
28a074c835
commit
1f8c5905b3
1 changed files with 1 additions and 1 deletions
|
@ -291,7 +291,7 @@ class VMwareShellManager(PyVmomi):
|
||||||
def process_exists_in_guest(self, vm, pid, creds):
|
def process_exists_in_guest(self, vm, pid, creds):
|
||||||
res = self.pm.ListProcessesInGuest(vm, creds, pids=[pid])
|
res = self.pm.ListProcessesInGuest(vm, creds, pids=[pid])
|
||||||
if not res:
|
if not res:
|
||||||
return False
|
return False, ''
|
||||||
res = res[0]
|
res = res[0]
|
||||||
if res.exitCode is None:
|
if res.exitCode is None:
|
||||||
return True, ''
|
return True, ''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue