Skip to content

Commit

Permalink
reformat json parsing statement to fit 80 char limit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewmbenton committed Jul 29, 2012
1 parent 60a8510 commit 2ada2bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/twilio-ruby/rest/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ def connect_and_send(request) # :doc:
rescue Exception
if retries_left > 0 then retries_left -= 1; retry else raise end
end
object = MultiJson.load response.body unless response.body.nil? || response.body.empty?
if response.body and !response.body.empty?
object = MultiJson.load response.body
end
if response.kind_of? Net::HTTPClientError
raise Twilio::REST::RequestError.new object['message'], object['code']
end
Expand Down

0 comments on commit 2ada2bc

Please sign in to comment.