Skip to content
Browse files

made sure keys sent to memcached are strings

Change-Id: Id7238d958ced1b4f44bc21a836d7796661022bc0
Reviewed-on: http://review.couchbase.org/20348
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>
Tested-by: Benjamin Young <benjamin@couchbase.com>
  • Loading branch information...
1 parent c055baa commit bc33db3c2de090d923951b0742314c451f7ca15e @BigBlueHat BigBlueHat committed with BigBlueHat
Showing with 2 additions and 0 deletions.
  1. +2 −0 couchbase/memcachedclient.py
View
2 couchbase/memcachedclient.py
@@ -60,6 +60,8 @@ def _sendMsg(self, cmd, key, val, opaque, extraHeader='', cas=0,
dtype=0, vbucketId=0,
fmt=MemcachedConstants.REQ_PKT_FMT,
magic=MemcachedConstants.REQ_MAGIC_BYTE):
+ if isinstance(key, unicode):
+ key = str(key)
if isinstance(val, int):
val = str(val)
msg = struct.pack(fmt, magic,

0 comments on commit bc33db3

Please sign in to comment.
Something went wrong with that request. Please try again.