summaryrefslogtreecommitdiff
path: root/distutils2
diff options
context:
space:
mode:
author?ric Araujo <merwok@netwok.org>2011-09-21 16:33:53 +0200
committer?ric Araujo <merwok@netwok.org>2011-09-21 16:33:53 +0200
commit95eee035e628b927671bc3b686d951e12caca5df (patch)
treece32d4ed82bf3c16ad9b29192788543df6c1c29e /distutils2
parent4817cda16f1bb3edbfb3d289c551af974bd63e69 (diff)
downloaddisutils2-95eee035e628b927671bc3b686d951e12caca5df.tar.gz
Fix name and attribute errors
Diffstat (limited to 'distutils2')
-rw-r--r--distutils2/_backport/tests/test_sysconfig.py2
-rw-r--r--distutils2/pypi/wrapper.py4
-rw-r--r--distutils2/tests/test_dist.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/distutils2/_backport/tests/test_sysconfig.py b/distutils2/_backport/tests/test_sysconfig.py
index 059150a..b500419 100644
--- a/distutils2/_backport/tests/test_sysconfig.py
+++ b/distutils2/_backport/tests/test_sysconfig.py
@@ -301,7 +301,7 @@ class TestSysConfig(unittest.TestCase):
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
index 2179aba..699beaa 100644
--- a/distutils2/pypi/wrapper.py
+++ b/distutils2/pypi/wrapper.py
@@ -25,8 +25,8 @@ def switch_index_if_fails(func, wrapper):
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
index f118cd9..0c1f036 100644
--- a/distutils2/tests/test_dist.py
+++ b/distutils2/tests/test_dist.py
@@ -70,7 +70,7 @@ class DistributionTestCase(support.TempdirManager,
__, 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',