diff options
-rwxr-xr-x | redis/client.py | 4 | ||||
-rw-r--r-- | tests/test_commands.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/redis/client.py b/redis/client.py index 95dc63f..570d94d 100755 --- a/redis/client.py +++ b/redis/client.py @@ -1788,8 +1788,8 @@ class StrictRedis(object): """ pieces = [] if block is not None: - if not isinstance(block, int) or block < 1: - raise RedisError("XREAD block must be a positive integer") + if not isinstance(block, int) or block < 0: + raise RedisError("XREAD block must be a non-negative integer") pieces.append("BLOCK") pieces.append(str(block)) if count is not None: diff --git a/tests/test_commands.py b/tests/test_commands.py index 17b34c7..c78de8b 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1662,7 +1662,7 @@ class TestStrictCommands(object): results = sr.xread(varname='$', count=10, block=10) assert results is None - results = sr.xread(count=3, block=1000, **{varname: stamp1}) + results = sr.xread(count=3, block=0, **{varname: stamp1}) assert results[varname][0][0] == stamp2 def test_strict_zadd(self, sr): |