summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xredis/client.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/redis/client.py b/redis/client.py
index 4e4ccc6..a3da1c4 100755
--- a/redis/client.py
+++ b/redis/client.py
@@ -1737,6 +1737,11 @@ class Redis:
``persist`` remove the time to live associated with ``name``.
"""
+ opset = set([ex, px, exat, pxat])
+ if len(opset) > 2 or len(opset) > 1 and persist:
+ raise DataError("``ex``, ``px``, ``exat``, ``pxat``",
+ "and ``persist`` are mutually exclusive.")
+
pieces = []
# similar to set command
if ex is not None: