Преглед изворни кода

Alter itertools import statement so that 2to3 fixes it.

Gary van der Merwe пре 10 година
родитељ
комит
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