aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Maier <andreas.r.maier@gmx.de>2017-11-22 20:40:01 +0100
committerAndreas Maier <andreas.r.maier@gmx.de>2017-11-22 20:40:01 +0100
commit87e3be861e20d10e395cef7b549cd660b3dcab26 (patch)
tree6c2c17ba05f1207b54638f2181783fc2de4a1ff1
parentd45be2cc4f7a1e4ddc70b363baaa613c6b068b98 (diff)
downloadexternal_python_setuptools-87e3be861e20d10e395cef7b549cd660b3dcab26.tar.gz
external_python_setuptools-87e3be861e20d10e395cef7b549cd660b3dcab26.tar.bz2
external_python_setuptools-87e3be861e20d10e395cef7b549cd660b3dcab26.zip
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)