aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/command/build_py.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/command/build_py.py')
-rw-r--r--setuptools/command/build_py.py2
1 files changed, 1 insertions, 1 deletions
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 "