lib/gogetit.rb in gogetit-0.22.6 vs lib/gogetit.rb in gogetit-0.22.7

- old
+ new

@@ -47,10 +47,18 @@ end end # for Libvirt(KVM), machines in pods controlled by MAAS conn = maas.conn - machines = conn.request(:get, ['machines']) + begin + machines = conn.request(:get, ['machines']) + rescue StandardError => e + puts e + abort( + "This method depends on MAAS with maas-client.\n"\ + "Please check if MAAS or maas-client is configured properly." + ) + end config[:libvirt][:nodes].each do |node| puts "Listing KVM instances on #{node[:url]}..." machines.each do |machine| if machine['pod']['name'] == node[:name] row = {}