From faea0b6fe83297ad27d5cc129fefc9de11927192 Mon Sep 17 00:00:00 2001 From: Adam DePue Date: Tue, 4 Jun 2013 17:36:01 +0000 Subject: [PATCH] Better condition handling on nil ip address --- lib/chef/knife/rackspace_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/knife/rackspace_base.rb b/lib/chef/knife/rackspace_base.rb index ece340e..b3448db 100644 --- a/lib/chef/knife/rackspace_base.rb +++ b/lib/chef/knife/rackspace_base.rb @@ -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