[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-distutils-sig
Subject:    [Distutils] [issue102] setuptools-0.6c11 regression
From:       Tres Seaver <setuptools () bugs ! python ! org>
Date:       2010-02-22 16:16:37
Message-ID: 1266855397.07.0.421511661273.issue102 () psf ! upfronthosting ! co ! za
[Download RAW message or body]

New submission from Tres Seaver <tseaver@palladion.com>:

package_index.PackageIndex.fetch_distribution changed between 0.6c9 and 0.6=
c11, 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_dis=
tribution
Added file: http://bugs.python.org/setuptools/file66/setuptools-0.6c11-find=
_distribution_miss.patch

_______________________________________________
Setuptools tracker <setuptools@bugs.python.org>
<http://bugs.python.org/setuptools/issue102>
_______________________________________________
["setuptools-0.6c11-find_distribution_miss.patch" (text/x-diff)]

--- 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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic