Commit 5ff51f88 authored by Anton Pershin's avatar Anton Pershin

Added a message showing up when the program is not found

parent edc8863b
...@@ -31,6 +31,11 @@ class Host(object): ...@@ -31,6 +31,11 @@ class Host(object):
self.commands[cmd_name] = cmd self.commands[cmd_name] = cmd
def get_program_launch_path(self, prog_name): def get_program_launch_path(self, prog_name):
if prog_name not in self.programs:
raise ValueError('Program "{prog_name}" is not recognized. '
'Please add this program to "custom_programs" '
'in the corresponding host in the config file '
'if you want to use it.')
path_to_prog = self.programs[prog_name] path_to_prog = self.programs[prog_name]
if path_to_prog is not None: if path_to_prog is not None:
return self.programs[prog_name] + '/' + prog_name return self.programs[prog_name] + '/' + prog_name
......
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