some fixes

This commit is contained in:
2019-09-10 16:03:54 +02:00
parent 61de3f3a5b
commit c1bf7fd13a

View File

@ -8,7 +8,9 @@ import RegisterDatapoint
import logging
import Converters
class CmdInterpreterException(ValueError): pass
class CmdInterpreterException(ValueError):
pass
def parseIntArbitraryBase(s):
i = 0
@ -20,6 +22,7 @@ def parseIntArbitraryBase(s):
i = int(s, 10)
return i
class CmdInterpreter(cmd.Cmd):
def __init__(self, infile, outfile, config, notifier, registers):
super().__init__(stdin=infile, stdout=outfile)
@ -54,7 +57,8 @@ class CmdInterpreter(cmd.Cmd):
def do_add_hr(self, arg):
try:
(label, unit, address, count, scanrate, readTopic, writeTopic, feedbackTopic, converter) = self.splitterRe.split(arg)
(label, unit, address, count, scanrate, readTopic, writeTopic, feedbackTopic, converter) =
self.splitterRe.split(arg)
self.__println("Label: {0}".format(label))
self.__println("Unit: {0}".format(unit))
self.__println("Address: {0}".format(address))