Skip to content
Snippets Groups Projects
Commit c1e2564e7216 authored by jfp's avatar jfp
Browse files

Exit program with the error code return by write to the command mailbox.

parent e5b812848926
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,17 @@
import json
from typing import Any, Set, Tuple
from ovms import cmbdef, dvidef, iodef, lnmdef, mbxqio, prvdef, psldef, starlet
from ovms import (
cmbdef,
crtl,
dvidef,
iodef,
lnmdef,
mbxqio,
prvdef,
psldef,
starlet,
)
from ovms.rtl import lib
supervisorctl_pwd = ''
......@@ -48,4 +58,5 @@
cmd['pwd'] = supervisorctl_pwd
cmd['mbxreply'] = supervisorctl_mbxreply
jscmd = json.dumps(cmd)
try:
self.mcmd.write(jscmd.encode('ascii'), iodef.IO_M_READERCHECK)
......@@ -51,4 +62,6 @@
self.mcmd.write(jscmd.encode('ascii'), iodef.IO_M_READERCHECK)
except OSError as e:
crtl.vms_exit(e.errno)
return json.loads(
# self.mcmd_r.read(4096, iodef.IO_M_WRITERCHECK) # type: ignore
self.mcmd_r.read(4096) # type: ignore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment