aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-11-24 15:57:33 -0500
committerJason R. Coombs <jaraco@jaraco.com>2013-11-24 15:57:33 -0500
commit833054f82f8d4389a66f8959ed8c9211ff5fa835 (patch)
treee720874847c8433886b1e71639039f445b36dd23
parentc070a1bb116494a694877eb8a2f30f1fd9e9eae5 (diff)
downloadexternal_python_setuptools-833054f82f8d4389a66f8959ed8c9211ff5fa835.tar.gz
external_python_setuptools-833054f82f8d4389a66f8959ed8c9211ff5fa835.tar.bz2
external_python_setuptools-833054f82f8d4389a66f8959ed8c9211ff5fa835.zip
Reorder exception handlers to work around warning about 'pkg_resources' being undefined.
-rw-r--r--ez_setup.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ez_setup.py b/ez_setup.py
index 0cc4a055..4703ed29 100644
--- a/ez_setup.py
+++ b/ez_setup.py
@@ -133,6 +133,8 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
try:
pkg_resources.require("setuptools>=" + version)
return
+ except pkg_resources.DistributionNotFound:
+ return _do_download(version, download_base, to_dir, download_delay)
except pkg_resources.VersionConflict:
if was_imported:
msg = textwrap.dedent("""
@@ -149,8 +151,6 @@ def use_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL,
# otherwise, reload ok
del pkg_resources, sys.modules['pkg_resources']
return _do_download(version, download_base, to_dir, download_delay)
- except pkg_resources.DistributionNotFound:
- return _do_download(version, download_base, to_dir, download_delay)
def _clean_check(cmd, target):
"""