Skip to content
Permalink
Browse files

Extract variable for template string

  • Loading branch information...
jaraco committed Feb 1, 2016
1 parent 783fe0b commit 0dcee791dfdcfacddaaec79b29f30a347a147413
Showing with 12 additions and 11 deletions.
  1. +12 −11 pkg_resources/__init__.py
@@ -1174,22 +1174,23 @@ def extraction_error(self):
old_exc = sys.exc_info()[1]
cache_path = self.extraction_path or get_default_cache()

err = ExtractionError("""Can't extract file(s) to egg cache
tmpl = textwrap.dedent("""
Can't extract file(s) to egg cache
The following error occurred while trying to extract file(s) to the Python egg
cache:
The following error occurred while trying to extract file(s) to the Python egg
cache:
%s
%s
The Python egg cache directory is currently set to:
The Python egg cache directory is currently set to:
%s
%s
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""" % (old_exc, cache_path)
)
Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.
""").lstrip()
err = ExtractionError(tmpl % (old_exc, cache_path))
err.manager = self
err.cache_path = cache_path
err.original_error = old_exc

0 comments on commit 0dcee79

Please sign in to comment.
You can’t perform that action at this time.