aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2013-07-04 21:09:03 -0400
committerJason R. Coombs <jaraco@jaraco.com>2013-07-04 21:09:03 -0400
commit9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92 (patch)
tree079fa10c2698a61df3a852c97c7b75bc3020fb00 /pkg_resources.py
parent96af0a8db149cc8c45c24c1a9066a71ab1935248 (diff)
downloadexternal_python_setuptools-9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92.tar.gz
external_python_setuptools-9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92.tar.bz2
external_python_setuptools-9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92.zip
Move warning check in `get_cache_path` to follow directory creation. Fixes #375.
--HG-- branch : distribute
Diffstat (limited to 'pkg_resources.py')
-rw-r--r--pkg_resources.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py
index e0e0c1a3..025a1162 100644
--- a/pkg_resources.py
+++ b/pkg_resources.py
@@ -989,13 +989,14 @@ variable to point to an accessible directory.
extract, as it tracks the generated names for possible cleanup later.
"""
extract_path = self.extraction_path or get_default_cache()
- self._warn_unsafe_extraction_path(extract_path)
target_path = os.path.join(extract_path, archive_name+'-tmp', *names)
try:
_bypass_ensure_directory(target_path)
except:
self.extraction_error()
+ self._warn_unsafe_extraction_path(extract_path)
+
self.cached_files[target_path] = 1
return target_path