From 76cfad4bda1d6720336137ebc97cf41a03f12030 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Fri, 19 Jan 2018 09:55:42 +0100 Subject: [PATCH] Some planning for #19 --- roberta/lab.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/roberta/lab.py b/roberta/lab.py index 78eae56..ddf7567 100644 --- a/roberta/lab.py +++ b/roberta/lab.py @@ -18,6 +18,8 @@ # ignore failure to make this testable outside of the target platform try: from ev3dev import auto as ev3dev + # TODO: prefer the module updated from the server + # sys.path.prepend(os.path.expanduser('~/.local/python/roberta') from .ev3 import Hal except ImportError: from .test import Ev3dev as ev3dev @@ -401,8 +403,10 @@ def run(self): self.service.hal.resetState() self.service.status('registered') elif cmd == 'update': - # FIXME: - # fetch new files (menu/hal) + # FIXME: implement + # ensure local module dir + # os.mkdirs('os.path.expanduser('~/.local/python/roberta/')) + # fetch ev3.py and store to ~/.local/python/roberta/ # then restart: # os.execv(__file__, sys.argv) # check if we need to close files (logger?)