mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00: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:
committed by
Abhijeet Kasurde
parent
28a074c835
commit
1f8c5905b3
@@ -291,7 +291,7 @@ class VMwareShellManager(PyVmomi):
|
||||
def process_exists_in_guest(self, vm, pid, creds):
|
||||
res = self.pm.ListProcessesInGuest(vm, creds, pids=[pid])
|
||||
if not res:
|
||||
return False
|
||||
return False, ''
|
||||
res = res[0]
|
||||
if res.exitCode is None:
|
||||
return True, ''
|
||||
|
||||
Reference in New Issue
Block a user