Permalink
Browse files

Tweak error message.

Also, do not treat ResolvError any dfiferently from any other StandardError.
  • Loading branch information...
1 parent e6b05cd commit 32fe381aee92ddd2beec8c6647ceb5bd634ba077 @BanzaiMan BanzaiMan committed Feb 4, 2013
Showing with 1 addition and 6 deletions.
  1. +1 −6 lib/rhc/helpers.rb
View
@@ -462,13 +462,8 @@ def hosts_file_contains?(host)
begin
resolver = Resolv::Hosts.new
resolver.getaddress host
- rescue Resolv::ResolvError
rescue => e
- debug "Error resolving host with Resolv::Hosts"
- debug "You can bypass this check with '--no-dns'."
- debug " #{e.class}"
- debug " #{e.message}"
- debug " #{e.backtrace}"
+ debug "Error while resolving with Resolv::Hosts: #{e.message}(#{e.class})\n #{e.backtrace.join("\n ")}"
end
end
# :nocov:

0 comments on commit 32fe381

Please sign in to comment.