Commit 0dcee791 authored by Jason R. Coombs's avatar Jason R. Coombs

Extract variable for template string

parent 783fe0bb
...@@ -1174,22 +1174,23 @@ class ResourceManager: ...@@ -1174,22 +1174,23 @@ class ResourceManager:
old_exc = sys.exc_info()[1] old_exc = sys.exc_info()[1]
cache_path = self.extraction_path or get_default_cache() 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 The following error occurred while trying to extract file(s) to the Python egg
cache: 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 Perhaps your account does not have write access to this directory? You can
change the cache directory by setting the PYTHON_EGG_CACHE environment change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory. variable to point to an accessible directory.
""" % (old_exc, cache_path) """).lstrip()
) err = ExtractionError(tmpl % (old_exc, cache_path))
err.manager = self err.manager = self
err.cache_path = cache_path err.cache_path = cache_path
err.original_error = old_exc err.original_error = old_exc
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment