You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by mf...@apache.org on 2012/03/20 15:37:48 UTC

[3/6] git commit: Client: Fixed LocalJump exception when instance operation is called

Client: Fixed LocalJump exception when instance operation is called


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/0e67b710
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/0e67b710
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/0e67b710

Branch: refs/heads/master
Commit: 0e67b7106f635084be92e6cb299b6099a23121d9
Parents: a190f16
Author: Michal Fojtik <mf...@redhat.com>
Authored: Tue Mar 20 14:22:18 2012 +0100
Committer: Michal fojtik <mf...@redhat.com>
Committed: Tue Mar 20 15:38:35 2012 +0100

----------------------------------------------------------------------
 client/lib/deltacloud.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/0e67b710/client/lib/deltacloud.rb
----------------------------------------------------------------------
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