Exemplo n.º 1
0
 def __init__(self):
     threading.Thread.__init__(self)
     self.lock = threading.Lock()
     self.usbuirt = UsbUirt()
     self.run_thread = False
     self.cmd = None
     #this object MUST be open just once through life of the daemon
     try:
         self.usbuirt.open(util.CONF_VAR['DEV_FILE'])
         util.log.debug('device ' + util.CONF_VAR['DEV_FILE'] + ' succesfully opened!')
     except:
         exit('device ' + util.CONF_VAR['DEV_FILE'] + ' has *NOT* been found')