diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-20 21:47:02 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-01-20 21:47:02 -0500 |
| commit | d66e85f360940a5e583ef6a363d20e8aa8cfd486 (patch) | |
| tree | 67a6c41d1ee804c5df88620f7d3bcbcf63b8469a /setuptools/command/easy_install.py | |
| parent | 209fbc31d5df376de6db40bc6b1d1d50e87a0a83 (diff) | |
| download | python-setuptools-git-d66e85f360940a5e583ef6a363d20e8aa8cfd486.tar.gz | |
Use io module for Python 2 compatibility
Diffstat (limited to 'setuptools/command/easy_install.py')
| -rwxr-xr-x | setuptools/command/easy_install.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index b8efff73..206fc58d 100755 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -37,6 +37,7 @@ import struct import contextlib import subprocess import shlex +import io from setuptools import Command from setuptools.sandbox import run_setup @@ -1801,7 +1802,7 @@ def is_python(text, filename='<string>'): def is_sh(executable): """Determine if the specified executable is a .sh (contains a #! line)""" try: - with open(executable, encoding='latin-1') as fp: + with io.open(executable, encoding='latin-1') as fp: magic = fp.read(2) except (OSError, IOError): return executable |
