From: Michal Fojtik <[email protected]>

Signed-off-by: Michal fojtik <[email protected]>
---
 client/lib/deltacloud.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
index bac3530..35fe86d 100644
--- a/client/lib/deltacloud.rb
+++ b/client/lib/deltacloud.rb
@@ -393,13 +393,13 @@ module DeltaCloud
         resource = RestClient::Resource.new(conf[:path], :open_timeout => 
conf[:open_timeout], :timeout => conf[:timeout])
         resource.send(:post, conf[:form_data], 
default_headers.merge(extended_headers)) do |response, request, block|
           response_error(response) unless response_successful? response.code
-          yield response.to_s
+          yield response.to_s if block_given?
         end
       else
         resource = RestClient::Resource.new(conf[:path], :open_timeout => 
conf[:open_timeout], :timeout => conf[:timeout])
         resource.send(conf[:method], default_headers.merge(extended_headers)) 
do |response, request, block|
           response_error(response) unless response_successful? response.code
-          yield response.to_s
+          yield response.to_s if block_given?
         end
       end
     end
-- 
1.7.9.1

Reply via email to