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:
mrmagooey 2018-09-18 21:23:17 +10:00 committed by Abhijeet Kasurde
commit 1f8c5905b3

View file

@ -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, ''