aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Regebro <regebro@gmail.com>2009-09-24 12:59:56 +0200
committerLennart Regebro <regebro@gmail.com>2009-09-24 12:59:56 +0200
commit758eba50d92348b0f1ba43a2e6ee3a842f49ffed (patch)
treeb27c61a6ff8422fd228eacab93420972f3ae48fc
parenta5bc17cc5361ffe425f4bbf587e1c24f1ef53263 (diff)
downloadexternal_python_setuptools-758eba50d92348b0f1ba43a2e6ee3a842f49ffed.tar.gz
external_python_setuptools-758eba50d92348b0f1ba43a2e6ee3a842f49ffed.tar.bz2
external_python_setuptools-758eba50d92348b0f1ba43a2e6ee3a842f49ffed.zip
Apparently a __ne__ method is necessary, at least under Python 2.4, or you risk having both Distr1 == Distr2 be True, while Distr1 != Distr2 is also True.
--HG-- branch : distribute extra : rebase_source : 3128c7105c4fdabd1bfceb105ca57cfb371eacec
-rw-r--r--pkg_resources.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 7c3d58fb..4babb48e 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -2064,6 +2064,8 @@ class Distribution(object):
# It's not a Distribution, so they are not equal
return False
return self.hashcmp == other.hashcmp
+ def __ne__(self, other):
+ return not self == other
# These properties have to be lazy so that we don't have to load any
# metadata until/unless it's actually needed. (i.e., some distributions