Skip to content

Commit

Permalink
rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
zippolyte committed Jan 30, 2020
1 parent 51874b6 commit af30b74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dogapi/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ def Dogapi.find_datadog_host

def Dogapi.find_localhost
unless @@hostname
out, status = Open3.capture2("hostname", "-f", :err=>File::NULL)
out, status = Open3.capture2('hostname', '-f', :err => File::NULL)
@@hostname = out.strip
# Get status to check if the call was successful
raise SystemCallError, 'Could not get hostname with `hostname -f`' unless status.exitstatus == 0
raise SystemCallError, 'Could not get hostname with `hostname -f`' unless status.exitstatus.zero?
end
rescue SystemCallError
@@hostname = Addrinfo.getaddrinfo(Socket.gethostname, nil, nil, nil, nil, Socket::AI_CANONNAME).first.canonname
Expand Down

0 comments on commit af30b74

Please sign in to comment.