lib/pears/provider/remote_file.rb in pears-0.0.9 vs lib/pears/provider/remote_file.rb in pears-0.0.10
- old
+ new
@@ -6,10 +6,13 @@
class RemoteFile < Base
def initialize(remote_url, on_failure: :raise)
yaml_data = Net::HTTP.get(URI(remote_url))
@data = parse_yaml(yaml_data)
- rescue SocketError, InvalidProviderData, Errno::ECONNREFUSED => e
+ rescue SocketError,
+ InvalidProviderData,
+ Errno::ECONNREFUSED,
+ Errno::EHOSTUNREACH => e
if on_failure == :null
@data = {}
else
raise e
end