Skip to content

Commit 18da169

Browse files
committed
Fix import error for itertools.izip on python 3.
1 parent 386a5de commit 18da169

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

mockredis/script.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import sys
22
import threading
3-
from itertools import izip
3+
try:
4+
# Python 2
5+
from itertools import izip
6+
except ImportError:
7+
# Python 3
8+
izip = zip
49
from mockredis.exceptions import ResponseError
510

611
LuaLock = threading.Lock()

0 commit comments

Comments
 (0)