Skip to content

Commit 0dd887e

Browse files
uglideCopilot
andauthored
Update redis/utils.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 01edcdd commit 0dd887e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

redis/utils.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313

1414
# Only support Hiredis >= 3.0:
1515
hiredis_version = hiredis.__version__.split(".")
16-
HIREDIS_AVAILABLE = int(hiredis_version[0]) >= 3 and int(hiredis_version[1]) >= 2
16+
HIREDIS_AVAILABLE = (
17+
int(hiredis_version[0]) > 3 or
18+
(int(hiredis_version[0]) == 3 and int(hiredis_version[1]) >= 2)
19+
)
1720
if not HIREDIS_AVAILABLE:
1821
raise ImportError("hiredis package should be >= 3.2.0")
1922
except ImportError:

0 commit comments

Comments
 (0)