From 41112f5afd0d2b0c14899ab1cf2c27183e64d6ac Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 9 Dec 2015 03:34:35 -0500 Subject: Use io.open for future compatibility and consistency --- setuptools/command/build_py.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'setuptools/command/build_py.py') diff --git a/setuptools/command/build_py.py b/setuptools/command/build_py.py index b2dafec9..8a50f032 100644 --- a/setuptools/command/build_py.py +++ b/setuptools/command/build_py.py @@ -163,7 +163,7 @@ class build_py(orig.build_py, Mixin2to3): with io.open(init_py, 'rb') as f: contents = f.read() - if b'declare_namespace' not in f.read(): + if b'declare_namespace' not in contents: raise distutils.errors.DistutilsError( "Namespace package problem: %s is a namespace package, but " "its\n__init__.py does not call declare_namespace()! Please " -- cgit v1.2.3