allow PY in commands, to be replaced with a specific python executable

This commit is contained in:
zolliker 2024-06-12 09:23:18 +02:00
parent 9a30ee6bc7
commit 95a3ff4ffd

View File

@ -146,11 +146,14 @@ class ServiceManager:
nr = section.get(self.group)
if nr is not None:
nr = '%02d' % int(nr)
self.commands[ins] = command.replace('~', expanduser('~'))
services = self.get_services(section)
env = {k: get_subs(section, k, ins, nr) for k in section if k.isupper()}
result[ins] = services
self.env[ins] = env
cmd = command.replace('~', expanduser('~'))
if cmd.startswith('PY '):
cmd = env.get('PY', 'python3') + cmd[2:]
self.commands[ins] = cmd
self.info = result
#def get_cmdpats(self, groups):