lib/chef/knife/topo_create.rb in knife-topo-0.0.6 vs lib/chef/knife/topo_create.rb in knife-topo-0.0.7

- old
+ new

@@ -95,18 +95,18 @@ # update any existing nodes topo_hash = topo.raw_data nodes = merge_topo_properties(topo_hash['nodes'], topo_hash) config[:disable_editing] = true - if nodes.length > 0 + if nodes && nodes.length > 0 nodes.each do |updates| node_name = updates['name'] node = update_node(updates) end # if bootstrap is specified, run the bootstrap command run_cmd(Chef::Knife::TopoBootstrap, @topo_bootstrap_args) if config[:bootstrap] else - ui.info "No nodes found for topology #{topo_hash.name}" + ui.info "No nodes found for topology #{topo_hash['name']}" end ui.info("Topology created") end