Raise TokenError if none provided to Pooler.delete

This commit is contained in:
Brian Cain 2016-11-14 09:49:23 -08:00
parent 97e188cf6d
commit a6ff0515d3
3 changed files with 16 additions and 1 deletions

View file

@ -336,7 +336,14 @@ class Vmfloaty
exit 1
else
hosts = hostnames.split(',')
Pooler.delete(verbose, url, hosts, token)
begin
Pooler.delete(verbose, url, hosts, token)
rescue TokenError => e
STDERR.puts e
exit 1
end
puts "Schedulered vmpooler to delete vms #{hosts}."
exit 0
end
end