summaryrefslogtreecommitdiff
path: root/pkg_resources.py
diff options
context:
space:
mode:
authortarek <none@none>2009-11-11 19:39:04 +0100
committertarek <none@none>2009-11-11 19:39:04 +0100
commit4072145aebca513ceaa0d25a64cb60d29842b300 (patch)
tree925ccdf895da4fda20814a9662dfb25aa2edd52c /pkg_resources.py
parenta0ca582da7e9322a6abc5d4ce028ee631ddbde70 (diff)
downloadpython-setuptools-git-4072145aebca513ceaa0d25a64cb60d29842b300.tar.gz
unknown setuptools version can be added in the working set, refs #90
--HG-- branch : distribute extra : rebase_source : c0aabd45025465b61ffd23a2196994f4afece233
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index 31d83554..96381932 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -2253,7 +2253,11 @@ class Distribution(object):
loc = loc or self.location
if self.project_name == 'setuptools':
- if '0.7' in self.version:
+ try:
+ version = self.version
+ except ValueError:
+ version = ''
+ if '0.7' in version:
raise ValueError(
"A 0.7-series setuptools cannot be installed "
"with distribute")