Commit 87e3be86 authored by Andreas Maier's avatar Andreas Maier

Improved exception message of pkg_resources.ResolutionError

parent d45be2cc
......@@ -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)
......
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