allow PY in commands, to be replaced with a specific python executable
This commit is contained in:
parent
9a30ee6bc7
commit
95a3ff4ffd
5
base.py
5
base.py
@ -146,11 +146,14 @@ class ServiceManager:
|
|||||||
nr = section.get(self.group)
|
nr = section.get(self.group)
|
||||||
if nr is not None:
|
if nr is not None:
|
||||||
nr = '%02d' % int(nr)
|
nr = '%02d' % int(nr)
|
||||||
self.commands[ins] = command.replace('~', expanduser('~'))
|
|
||||||
services = self.get_services(section)
|
services = self.get_services(section)
|
||||||
env = {k: get_subs(section, k, ins, nr) for k in section if k.isupper()}
|
env = {k: get_subs(section, k, ins, nr) for k in section if k.isupper()}
|
||||||
result[ins] = services
|
result[ins] = services
|
||||||
self.env[ins] = env
|
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
|
self.info = result
|
||||||
|
|
||||||
#def get_cmdpats(self, groups):
|
#def get_cmdpats(self, groups):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user