Skip to content

Commit

Permalink
Check for empty IPAM Config (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
florindragos authored and davejrt committed Sep 20, 2018
1 parent fa7249c commit da931f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/puppet/provider/docker_network/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def self.instances
ipam_driver = unless obj['IPAM']['Driver'].nil?
obj['IPAM']['Driver']
end
subnet = unless obj['IPAM']['Config'].nil?
subnet = unless obj['IPAM']['Config'].nil? || obj['IPAM']['Config'].empty?
if obj['IPAM']['Config'].first.key? 'Subnet'
obj['IPAM']['Config'].first['Subnet']
end
Expand Down

0 comments on commit da931f3

Please sign in to comment.