Permalink
Browse files

added dictionary processing to Bucket.set()

Change-Id: I5e11e72853314f35d8807737af888d1d191551cf
Reviewed-on: http://review.couchbase.org/20344
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Benjamin Young <benjamin@couchbase.com>
  • Loading branch information...
1 parent d3796c7 commit 47a01a546a979de7335ca3aca2332e5da08f712e @BigBlueHat BigBlueHat committed with Benjamin Young Aug 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 couchbase/client.py
View
@@ -214,6 +214,8 @@ def decr(self, key, amt=1, init=0, exp=0):
return self.mc_client.decr(key, amt, init, exp)
def set(self, key, expiration, flags, value):
+ if isinstance(value, dict):
+ value = json.dumps(value)
return self.mc_client.set(key, expiration, flags, value)
def add(self, key, exp, flags, val):

0 comments on commit 47a01a5

Please sign in to comment.