1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

Fix sync_clock method, only rescue Excon::Errors::HTTPStatusError that are known to have a #response method, let all other exceptions bubble up

This commit is contained in:
Manuel Meurer 2012-03-13 09:43:47 +01:00
parent 2a4abcd092
commit c88b16a008

View file

@ -8,8 +8,8 @@ module Fog
def sync_clock
response = begin
get_service
rescue => error
error.respond_to(:response) ? error.response : error.message
rescue Excon::Errors::HTTPStatusError => error
error.response
end
Fog::Time.now = Time.parse(response.headers['Date'])
end