deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [4/7] git commit: Client: Return 'nil' from destroy operations on buckets/blobs
Date Fri, 10 Aug 2012 07:37:45 GMT
Client: Return 'nil' from destroy operations on buckets/blobs

* All :destroy operation should return 'nil' when they succeed


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

Branch: refs/heads/master
Commit: 602d5ea4a41f41fec80b5321679c96eda21a7596
Parents: c210feb
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Aug 8 14:51:50 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Fri Aug 10 09:38:21 2012 +0200

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/602d5ea4/client/lib/client_bucket_methods.rb
----------------------------------------------------------------------
diff --git a/client/lib/client_bucket_methods.rb b/client/lib/client_bucket_methods.rb
index 44eca0f..a3dfda0 100644
--- a/client/lib/client_bucket_methods.rb
+++ b/client/lib/client_bucket_methods.rb
@@ -27,7 +27,7 @@ module ClientBucketMethods
     #actually response here is 204 - no content - so nothing returned to client?
     request(:delete, "#{api_uri.to_s}/buckets/#{params['id']}") do |response|
       handle_backend_error(response) if response.code!=204
-      response
+      nil if response.code == 204
     end
   end
 
@@ -53,7 +53,7 @@ module ClientBucketMethods
   def destroy_blob(params)
     request(:delete, "#{api_uri.to_s}/buckets/#{params['bucket']}/#{params[:id]}") do |response|
       handle_backend_error(response) if response.code!=204
-      response
+      nil if response.code == 204
     end
   end
 


Mime
View raw message