diff options
-rw-r--r-- | distribute_setup.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/distribute_setup.py b/distribute_setup.py index b40a9499..59424ccc 100644 --- a/distribute_setup.py +++ b/distribute_setup.py @@ -240,13 +240,14 @@ def _remove_flat_installation(placeholder): break if not found: log.warn('Could not locate setuptools*.egg-info') + return + + log.warn('Removing elements out of the way...') + pkg_info = os.path.join(placeholder, file) + if os.path.isdir(pkg_info): + patched = _patch_egg_dir(pkg_info) else: - log.warn('Removing elements out of the way...') - pkg_info = os.path.join(placeholder, file) - if os.path.isdir(pkg_info): - patched = _patch_egg_dir(pkg_info) - else: - patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) + patched = _patch_file(pkg_info, SETUPTOOLS_PKG_INFO) if not patched: log.warn('%s already patched.', pkg_info) |