Commit 4a7e5695 authored by Federico Sismondi's avatar Federico Sismondi
Browse files

fixes on serial interface calls

parent a5e3868b
......@@ -53,20 +53,15 @@ class SerialListener(object):
log.error('Does dev %s exist?' % serial_port)
sys.exit(1)
try:
self.ser.close()
except Exception as e:
log.debug(e)
try:
self.ser.open()
except Exception as e:
log.debug(e)
log.error(e)
try:
self.ser.flushInput()
except Exception as e:
log.debug(e)
log.error(e)
self.data_plane_mrkey = "data.serial.fromAgent.%s" % self.agent_name
self.control_plane_mrkey = "control.serial.fromAgent.%s" % self.agent_name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment