Skip to content

Commit 8d27f0a

Browse files
committed
Simply import io
1 parent 6259873 commit 8d27f0a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

setuptools_scm/git.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
from .utils import do_ex, trace, has_command, _normalized
22
from .version import meta
3-
try:
4-
from io import BytesIO
5-
except ImportError:
6-
from cStringIO import StringIO as BytesIO
3+
import io
74

85
from os.path import isfile, join
96
import subprocess
@@ -124,7 +121,7 @@ def _list_files_in_archive():
124121
"""List the files that 'git archive' generates.
125122
"""
126123
# TarFile wants a seekable stream.
127-
stream = BytesIO(subprocess.check_output(['git', 'archive', 'HEAD']))
124+
stream = io.BytesIO(subprocess.check_output(['git', 'archive', 'HEAD']))
128125
for name in TarFile(fileobj=stream).getnames():
129126
print(name)
130127

0 commit comments

Comments
 (0)