Merge pull request #1625 from ajsharp/patch-1
Add Errno::ENETUNREACH to exception list in BasicNetworkResolver
This commit is contained in:
commit
8292bc9899
|
@ -21,7 +21,7 @@ module Middleman
|
|||
# Array of Names
|
||||
def getnames(ip)
|
||||
resolver.getnames(ip.to_s).map(&:to_s)
|
||||
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL
|
||||
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL, Errno::ENETUNREACH
|
||||
[]
|
||||
end
|
||||
|
||||
|
@ -34,7 +34,7 @@ module Middleman
|
|||
# Array of ipaddresses
|
||||
def getaddresses(name)
|
||||
resolver.getaddresses(name.to_s).map(&:to_s)
|
||||
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL
|
||||
rescue Resolv::ResolvError, Errno::EADDRNOTAVAIL, Errno::ENETUNREACH
|
||||
[]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue