[Python-checkins] distutils2: Fix name and attribute errors
eric.araujo
python-checkins at python.org
Wed Sep 21 16:35:45 CEST 2011
http://hg.python.org/distutils2/rev/248b102b7d69
changeset: 1185:248b102b7d69
user: Éric Araujo <merwok at netwok.org>
date: Wed Sep 21 16:33:53 2011 +0200
summary:
Fix name and attribute errors
files:
distutils2/_backport/tests/test_sysconfig.py | 2 +-
distutils2/pypi/wrapper.py | 4 ++--
distutils2/tests/test_dist.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/distutils2/_backport/tests/test_sysconfig.py b/distutils2/_backport/tests/test_sysconfig.py
--- a/distutils2/_backport/tests/test_sysconfig.py
+++ b/distutils2/_backport/tests/test_sysconfig.py
@@ -301,7 +301,7 @@
stderr=devnull_fp,
env=env)
finally:
- fp.close()
+ devnull_fp.close()
test_platform = p.communicate()[0].strip()
test_platform = test_platform.decode('utf-8')
status = p.wait()
diff --git a/distutils2/pypi/wrapper.py b/distutils2/pypi/wrapper.py
--- a/distutils2/pypi/wrapper.py
+++ b/distutils2/pypi/wrapper.py
@@ -25,8 +25,8 @@
exception = None
methods = [func]
for f in wrapper._indexes.values():
- if f != func.__self__ and hasattr(f, func.__name__):
- methods.append(getattr(f, func.__name__))
+ if f != func.im_self and hasattr(f, func.f_name):
+ methods.append(getattr(f, func.f_name))
for method in methods:
try:
response = method(*args, **kwargs)
diff --git a/distutils2/tests/test_dist.py b/distutils2/tests/test_dist.py
--- a/distutils2/tests/test_dist.py
+++ b/distutils2/tests/test_dist.py
@@ -70,7 +70,7 @@
__, stdout = captured_stdout(create_distribution, files)
self.assertEqual(stdout, '')
finally:
- packaging.dist.DEBUG = False
+ distutils2.dist.DEBUG = False
def test_bad_attr(self):
Distribution(attrs={'author': 'xxx',
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list