Permalink
Browse files

DELETE cmd can contains non-ascii chars.

And it will raise exception in send_cmd - (cmd + '\r\n').encode('ascii')
  • Loading branch information...
1 parent 9a5f1eb commit 56842f52b58299831207e97aa9defdbd7ef68d26 @xpoft xpoft committed Apr 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 memcache.py
View
@@ -367,7 +367,7 @@ def delete(self, key, time=0):
cmd = "delete %s" % key
try:
- server.send_cmd(cmd)
+ server.send_cmd(cmd.encode('utf-8'))
server.expect(b"DELETED")
except socket.error as msg:
if type(msg) is tuple: msg = msg[1]

0 comments on commit 56842f5

Please sign in to comment.