summaryrefslogtreecommitdiff
path: root/redis/client.py
diff options
context:
space:
mode:
authorhuangqiyin <huangqiyin@sicent.com>2017-03-27 15:10:10 +0800
committerhuangqiyin <huangqiyin@sicent.com>2017-03-27 15:10:10 +0800
commit3d328faa2f4015ee8c1f99dfd7ff727cf25eb913 (patch)
treefadd2cf5ba4ae7a2b33949d926b6f336ef286764 /redis/client.py
parent688b400e7d18c3b5ccd3f7f4504f8487a56c8584 (diff)
downloadredis-py-3d328faa2f4015ee8c1f99dfd7ff727cf25eb913.tar.gz
fix can't raise invalid expire time when set px param is 0
Diffstat (limited to 'redis/client.py')
-rwxr-xr-xredis/client.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/redis/client.py b/redis/client.py
index 30a56a2..14d424d 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1155,7 +1155,7 @@ class StrictRedis(object):
if isinstance(ex, datetime.timedelta):
ex = ex.seconds + ex.days * 24 * 3600
pieces.append(ex)
- if px:
+ if px is not None:
pieces.append('PX')
if isinstance(px, datetime.timedelta):
ms = int(px.microseconds / 1000)