mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Sometimes the response body is empty.
This commit is contained in:
parent
4add747ab3
commit
02db287340
1 changed files with 2 additions and 1 deletions
|
@ -10,6 +10,7 @@ module Fog
|
|||
|
||||
request_path 'fog/serverlove/requests/compute'
|
||||
request :get_drives
|
||||
request :destroy_drive
|
||||
|
||||
model_path 'fog/serverlove/models/compute'
|
||||
model :drive
|
||||
|
@ -48,7 +49,7 @@ module Fog
|
|||
|
||||
raise_if_error!(response)
|
||||
|
||||
response.body = Fog::JSON.decode(response.body)
|
||||
response.body = Fog::JSON.decode(response.body) if response.body && response.body.length > 0
|
||||
|
||||
response
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue