From 1bd326f6a8164d2a269a4fa11dd583f714d34db3 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Mon, 20 Feb 2017 18:09:19 +0100 Subject: [PATCH] Script execution --- script/local.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/script/local.py b/script/local.py index 4df0345..fd9526d 100644 --- a/script/local.py +++ b/script/local.py @@ -29,12 +29,14 @@ class RobotTCP(TcpDevice): self.getLogger().finer("RX = " + str(rx)) if rx[:3] != id: raise Exception("Received invalid message id") + if rx[3] == "*": + raise Exception(rx[4:]) return rx[4:] def execute(self, command, *argv): msg = str(command) - #if len(argv>10): - # raise Exception("Exceeded maximum number of parameters") + if len(argv)>10: + raise Exception("Exceeded maximum number of parameters") for arg in argv: msg = msg + "," + str(arg) ret = self.call(msg)