aboutsummaryrefslogtreecommitdiffstats
path: root/pkg_resources
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-03-08 15:35:36 -0400
committerGitHub <noreply@github.com>2020-03-08 15:35:36 -0400
commit37e1ca6d12420468a545acdd035050780b997d7f (patch)
tree319384f79113a516fe5ec31c3396c531b64fb781 /pkg_resources
parentcbfd4181ca6ac038e0c60d25a97db1ab33b04151 (diff)
parentd8e103d12af18bb8100952b4bc08eeed491b97c6 (diff)
downloadexternal_python_setuptools-37e1ca6d12420468a545acdd035050780b997d7f.tar.gz
external_python_setuptools-37e1ca6d12420468a545acdd035050780b997d7f.tar.bz2
external_python_setuptools-37e1ca6d12420468a545acdd035050780b997d7f.zip
Merge pull request #1899 from pypa/feature/1823-fail-warnings
Error on warnings.
Diffstat (limited to 'pkg_resources')
-rw-r--r--pkg_resources/__init__.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 75563f95..88d4bdca 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -1235,12 +1235,13 @@ class ResourceManager:
mode = os.stat(path).st_mode
if mode & stat.S_IWOTH or mode & stat.S_IWGRP:
msg = (
- "%s is writable by group/others and vulnerable to attack "
- "when "
- "used with get_resource_filename. Consider a more secure "
+ "Extraction path is writable by group/others "
+ "and vulnerable to attack when "
+ "used with get_resource_filename ({path}). "
+ "Consider a more secure "
"location (set with .set_extraction_path or the "
- "PYTHON_EGG_CACHE environment variable)." % path
- )
+ "PYTHON_EGG_CACHE environment variable)."
+ ).format(**locals())
warnings.warn(msg, UserWarning)
def postprocess(self, tempname, filename):