New submission from Tres Seaver <tsea...@palladion.com>:
package_index.PackageIndex.fetch_distribution changed between 0.6c9 and 0.6c11,
adding some logging, and returning a clone of the found distribution. However,
the new code neglects to check that the dist is not None before cloning it.
The attached patch fixes this bug.
----------
assignedto: pje
files: setuptools-0.6c11-find_distribution_miss.patch
messages: 504
nosy: pje, tseaver
priority: bug
status: unread
title: setuptools-0.6c11 regression in
package_index.PackageIndex.fetch_distribution
Added file:
http://bugs.python.org/setuptools/file66/setuptools-0.6c11-find_distribution_miss.patch
_______________________________________________
Setuptools tracker <setupto...@bugs.python.org>
<http://bugs.python.org/setuptools/issue102>
_______________________________________________
--- setuptools-0.6c11-py2.4.egg/setuptools/package_index.py.orig 2010-02-22 11:09:17.159385909 -0500
+++ setuptools-0.6c11-py2.4.egg/setuptools/package_index.py 2010-02-22 11:09:39.831417000 -0500
@@ -466,14 +466,14 @@
dist = find(self, requirement)
if dist is None:
- import pdb; pdb.set_trace()
self.warn(
"No local packages or download links found for %s%s",
(source and "a source distribution of " or ""),
requirement,
)
- self.info("Best match: %s", dist)
- return dist.clone(location=self.download(dist.location, tmpdir))
+ else:
+ self.info("Best match: %s", dist)
+ return dist.clone(location=self.download(dist.location, tmpdir))
def fetch(self, requirement, tmpdir, force_scan=False, source=False):
_______________________________________________
Distutils-SIG maillist - Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig