summaryrefslogtreecommitdiff
path: root/lib/custodian/util/dns.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:19:47 +0000
commite716a49dabe2c086a97e2d8b3cffe5cf369ad026 (patch)
treee7e98125f89941db4c9d0f48f2df9c410467a3d8 /lib/custodian/util/dns.rb
parentaf2ee063abea8235a8cbd1448533e4f4fbc0d0af (diff)
Removed spaces inside parenthesis.
Diffstat (limited to 'lib/custodian/util/dns.rb')
-rw-r--r--lib/custodian/util/dns.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/util/dns.rb b/lib/custodian/util/dns.rb
index 2a0c705..b93fef5 100644
--- a/lib/custodian/util/dns.rb
+++ b/lib/custodian/util/dns.rb
@@ -20,7 +20,7 @@ module Custodian
#
# Return the reverse DNS for the specified IP address, nil on failure.
#
- def DNS.ip_to_hostname( ip )
+ def DNS.ip_to_hostname(ip)
resolved = nil
#
@@ -30,9 +30,9 @@ module Custodian
period = settings.timeout
begin
- timeout( period ) do
+ timeout(period) do
begin
- resolved = Socket.getnameinfo(Socket.sockaddr_in(80, ip) ).first
+ resolved = Socket.getnameinfo(Socket.sockaddr_in(80, ip)).first
rescue SocketError
resolved = nil
end
@@ -47,7 +47,7 @@ module Custodian
#
# Convert a hostname to an IP address, return nil on failure.
#
- def DNS.hostname_to_ip( hostname )
+ def DNS.hostname_to_ip(hostname)
resolved = nil
@@ -58,7 +58,7 @@ module Custodian
period = settings.timeout
begin
- timeout( period ) do
+ timeout(period) do
begin
Socket.getaddrinfo(hostname, 'echo').each do |a|
resolved = a[3] if a