From fa93804ffc9bc3e8e24aa03bff18e9631f96d0cb Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Tue, 15 Sep 2015 13:53:20 -0700 Subject: [PATCH] Check if hosts are nil for delete method --- lib/vmfloaty/pooler.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/vmfloaty/pooler.rb b/lib/vmfloaty/pooler.rb index 94b4e2f..445949f 100644 --- a/lib/vmfloaty/pooler.rb +++ b/lib/vmfloaty/pooler.rb @@ -47,6 +47,11 @@ class Pooler end def self.delete(verbose, url, hostnames) + if hostnames.nil? + STDERR.puts "You did not provide any hosts to delete" + exit 1 + end + hosts = hostnames.split(',') conn = Http.get_conn(verbose, url)