VMware: fix return to return a tuple instead of a bool (#45764)

fixes "'bool' object is not iterable" exception when `res` is falsey
pull/35275/merge
mrmagooey 6 years ago committed by Abhijeet Kasurde
parent 28a074c835
commit 1f8c5905b3

@ -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…
Cancel
Save