def keep_lease_alive(lease):
 while True:
  sleep(5)
  try:
   lease.HttpNfcLeaseProgress(50)
   if (lease.state == vim.HttpNfcLease.State.done):
    return
  except:
   return

def keep_lease_alive ( lease ) : while True : sleep ( 5 ) try : lease . HttpNfcLeaseProgress ( 50 ) if ( lease . state == vim . HttpNfcLease . State . done ) : return except : return
keeps the lease alive while posting the vmdk .