aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-07-03 14:21:23 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-07-03 14:21:23 -0400
commit1cd926faeaf2c6206200317f328f16f9503879a3 (patch)
tree57c86b85e83d1ea13542c67a2c8dec8186842654 /pkg_resources.py
parented30b72b2d7a36ca72cf5aedf84d771bbfbeef81 (diff)
downloadexternal_python_setuptools-1cd926faeaf2c6206200317f328f16f9503879a3.tar.gz
external_python_setuptools-1cd926faeaf2c6206200317f328f16f9503879a3.tar.bz2
external_python_setuptools-1cd926faeaf2c6206200317f328f16f9503879a3.zip
Issue #32: Fixed TypeError in get_resource_stream on zipped eggs0.8b6
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 74ab231d..bbc2f09a 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -28,7 +28,7 @@ except NameError:
try:
basestring
next = lambda o: o.next()
- from cStringIO import StringIO
+ from cStringIO import StringIO as BytesIO
def exec_(code, globs=None, locs=None):
if globs is None:
frame = sys._getframe(1)
@@ -41,7 +41,7 @@ try:
exec("""exec code in globs, locs""")
except NameError:
basestring = str
- from io import StringIO
+ from io import BytesIO
exec_ = eval("exec")
def execfile(fn, globs=None, locs=None):
if globs is None:
@@ -1402,7 +1402,7 @@ class NullProvider:
return self._fn(self.module_path, resource_name)
def get_resource_stream(self, manager, resource_name):
- return StringIO(self.get_resource_string(manager, resource_name))
+ return BytesIO(self.get_resource_string(manager, resource_name))
def get_resource_string(self, manager, resource_name):
return self._get(self._fn(self.module_path, resource_name))