From 9b6dfd8fcd35777b17a132ee0475d25ab1e6ac92 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 4 Jul 2013 21:09:03 -0400 Subject: Move warning check in `get_cache_path` to follow directory creation. Fixes #375. --HG-- branch : distribute --- pkg_resources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg_resources.py') 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 -- cgit v1.2.1