Skip to content

Commit 664bd3e

Browse files
author
Sean Reifschneider
committed
Fix for value being boolean in set().
1 parent d9c602f commit 664bd3e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

ChangeLog

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Fri, 31 Jul 2015 11:38:25 -0600 Sean Reifschneider <[email protected]>
2+
3+
* 1.57 release.
4+
5+
* Fix for #75 and #76, mc.set(key, False) results in "ValueError:
6+
invalid literal for int()". Reported by Carlos Sanchez on github.
7+
18
Sun, 26 Jul 2015 14:44:20 -0600 Sean Reifschneider <[email protected]>
29

310
* 1.56 release.

memcache.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def useOldServerHashFunction():
9090

9191
# Original author: Evan Martin of Danga Interactive
9292
__author__ = "Sean Reifschneider <[email protected]>"
93-
__version__ = "1.56"
93+
__version__ = "1.57"
9494
__copyright__ = "Copyright (C) 2003 Danga Interactive"
9595
# http://en.wikipedia.org/wiki/Python_Software_Foundation_License
9696
__license__ = "Python Software Foundation License"
@@ -934,7 +934,7 @@ def _val_to_store_info(self, val, min_compress_len):
934934
val = val.encode('utf-8')
935935
elif isinstance(val, int):
936936
flags |= Client._FLAG_INTEGER
937-
val = str(val)
937+
val = '%d' % val
938938
if six.PY3:
939939
val = val.encode('ascii')
940940
# force no attempt to compress this silly string.

0 commit comments

Comments
 (0)