aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-11-25 10:05:18 -0500
committerGitHub <noreply@github.com>2017-11-25 10:05:18 -0500
commit98f383aeaacec60d773abdc008327ba29f8febe3 (patch)
treeef48a4cc4a0471f25abb6fb5e47972b477cfd3af
parentc90ddcb846bec53761b1622b294e846786f875bf (diff)
parent87e3be861e20d10e395cef7b549cd660b3dcab26 (diff)
downloadexternal_python_setuptools-98f383aeaacec60d773abdc008327ba29f8febe3.tar.gz
external_python_setuptools-98f383aeaacec60d773abdc008327ba29f8febe3.tar.bz2
external_python_setuptools-98f383aeaacec60d773abdc008327ba29f8febe3.zip
Merge pull request #1209 from andy-maier/issue1208-resolution-error-msg
Fixes #1208: Improved exception message of pkg_resources.ResolutionError
-rw-r--r--pkg_resources/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index c06cf4b1..62b82081 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -1513,7 +1513,9 @@ class NullProvider:
def run_script(self, script_name, namespace):
script = 'scripts/' + script_name
if not self.has_metadata(script):
- raise ResolutionError("No script named %r" % script_name)
+ raise ResolutionError(
+ "No script named %r in 'scripts' directory of metadata "
+ "directory %r" % (script_name, self.egg_info))
script_text = self.get_metadata(script).replace('\r\n', '\n')
script_text = script_text.replace('\r', '\n')
script_filename = self._fn(self.egg_info, script)