mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 22:49:23 +01:00
commands: Add a helpful error message instead of OSError when a subprocess can't be started.
This commit is contained in:
parent
0e2b0a96c8
commit
76ead86e2c
@ -129,7 +129,17 @@ def process(f, *args, **kwargs):
|
||||
targetArgs = (f, q,) + args
|
||||
p = callbacks.CommandProcess(target=newf,
|
||||
args=targetArgs, kwargs=kwargs)
|
||||
p.start()
|
||||
try:
|
||||
p.start()
|
||||
except OSError as e:
|
||||
log.error(
|
||||
'Failed to start a subprocess because of the following error: %s '
|
||||
'This might be caused by the way Limnoria is demonized / run in '
|
||||
'the background. Instead, try running it as a service '
|
||||
'<https://docs.limnoria.net/use/supybot-botchk.html>, '
|
||||
'use the --daemon option, or run it in screen/tmux.',
|
||||
e)
|
||||
raise
|
||||
p.join(timeout)
|
||||
if p.is_alive():
|
||||
p.terminate()
|
||||
|
Loading…
Reference in New Issue
Block a user