diff options
-rwxr-xr-x | redis/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/redis/client.py b/redis/client.py index d7608aa..98764ca 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1150,12 +1150,12 @@ class StrictRedis(object): already exists. """ pieces = [name, value] - if ex: + if ex is not None: pieces.append('EX') 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) |