Commits

Simon Cross committed 91179e0

Add w parameter to delete.

  • Participants
  • Parent commits c62760a

Comments (0)

Files changed (1)

File txriak/riak_object.py

         defer.returnValue(self)
 
     @defer.inlineCallbacks
-    def delete(self, dw=None):
+    def delete(self, w=None, dw=None):
         """
         Delete this object from Riak.
 
-        :param dw: Wait until this many partitions have deleted
-                   the object before responding.
+        :param w: wait for this many partitions to respond
+            before returning to client.
+        :type w: integer
+        :param dw: wait for this many partitions to
+            confirm the write before returning to client.
+        :type dw: integer
         :returns: self -- via deferred
         """
         # Use defaults if not specified...
+        w = self._bucket.get_w(w)
         dw = self._bucket.get_dw(dw)
 
         # Construct the URL...
-        params = {'dw': dw}
+        params = {'w': w, 'dw': dw}
         host, port, url = util.build_rest_path(self._client,
                                     self._bucket, self._key, None, params)