From 75533464d7e5e046ce4e9d9a5b73dd111fbb7d99 Mon Sep 17 00:00:00 2001 From: "phillip.eby" Date: Sat, 26 Nov 2005 18:59:35 +0000 Subject: If more than one URL appears to describe the exact same distribution, prefer the shortest one. This helps to avoid "table of contents" CGI URLs like the ones on effbot.org. git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@41550 6015fed2-1504-0410-9fe1-9d1591cc4771 --- pkg_resources.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg_resources.py') diff --git a/pkg_resources.py b/pkg_resources.py index 4cf262b..371ef20 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1754,7 +1754,7 @@ class Distribution(object): hashcmp = property( lambda self: ( getattr(self,'parsed_version',()), self.precedence, self.key, - self.location, self.py_version, self.platform + -len(self.location), self.location, self.py_version, self.platform ) ) def __cmp__(self, other): return cmp(self.hashcmp, other) -- cgit v1.2.1