Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Better condition handling on nil ip address
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam DePue committed Jun 7, 2013
1 parent 20d7b29 commit faea0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/chef/knife/rackspace_base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def public_dns_name(server)
@public_dns_name ||= begin
Resolv.getname(ip_address)
rescue
"#{ip_address.gsub('.','-')}.static.cloud-ips.com" unless ip_address == nil
"#{ip_address.gsub('.','-')}.static.cloud-ips.com" if ip_address
end
end

Expand Down

0 comments on commit faea0b6

Please sign in to comment.