Script execution
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user