Skip to content

Commit

Permalink
#12 fixed waitfortasks hang issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashby, Jason (IMS) committed Sep 23, 2015
1 parent 9f0bcc0 commit b3271e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 0 additions & 2 deletions ezmomi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ def cli():
)
subparsers = parser.add_subparsers(help='Command', dest='mode')

from pprint import pprint

# set up each command section
add_params(subparsers)

Expand Down
9 changes: 5 additions & 4 deletions ezmomi/ezmomi.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def get_host_system_failfast(self, name, verbose=False, host_system_term='HS'):
sys.exit(1)

if True == verbose:
print("Found HostSystem: {0} Name: {1}", hs, hs.name)
print "Found HostSystem: {0} Name: {1}" % (hs, hs.name)

return hs

Expand All @@ -600,7 +600,7 @@ def get_vm_failfast(self, name, verbose=False, vm_term='VM'):
sys.exit(1)

if True == verbose:
print("Found VirtualMachine: {0} Name: {1}", vm, vm.name)
print "Found VirtualMachine: %s Name: %s" % (vm, vm.name)

return vm

Expand Down Expand Up @@ -642,8 +642,9 @@ def WaitForTasks(self, tasks):
if change.name == 'info':
state = change.val.state
elif change.name == 'info.state':
if not str(task) in taskList:
continue
state = change.val
else:
continue

if state == vim.TaskInfo.State.success:
# Remove task from taskList
Expand Down

0 comments on commit b3271e8

Please sign in to comment.