diff options
author | Chayim <chayim@users.noreply.github.com> | 2021-07-29 20:32:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 20:32:29 +0300 |
commit | be26730e8136e6a27f397491d44fa723449023db (patch) | |
tree | c786ddcca6351eee4ed2e5ce9a811e8e150c9ff1 | |
parent | fc69bd65494d7ac8d08e16ff38e06936ab6dcc02 (diff) | |
download | redis-py-be26730e8136e6a27f397491d44fa723449023db.tar.gz |
ensuring we adhere to exlusive options for getex (#1531)
-rwxr-xr-x | redis/client.py | 5 |
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: |