浏览代码

Alter itertools import statement so that 2to3 fixes it.

Gary van der Merwe 11 年之前
父节点
当前提交
395b1460cb
共有 2 个文件被更改,包括 2 次插入10 次删除
  1. 1 5
      dulwich/diff_tree.py
  2. 1 5
      dulwich/pack.py

+ 1 - 5
dulwich/diff_tree.py

@@ -24,11 +24,7 @@ from collections import (
     )
 
 from io import BytesIO
-try:
-    from itertools import izip, chain
-except ImportError:
-    from itertools import chain
-    izip = zip
+from itertools import chain, izip
 import stat
 
 from dulwich.objects import (

+ 1 - 5
dulwich/pack.py

@@ -39,11 +39,7 @@ from collections import (
     )
 import difflib
 
-try:
-    from itertools import chain, imap, izip
-except ImportError: # On Py3k the equivalents are the basic map and zip
-    from itertools import chain
-    imap, izip = map, zip
+from itertools import chain, imap, izip
 
 try:
     import mmap