bytesize=EIGHTBITS, #number of databits
parity=PARITY_NONE, #enable parity checking
stopbits=STOPBITS_ONE, #number of stopbits
- timeout=1, #set a timeout value, None for waiting forever, return on read
+ timeout=10, #set a timeout value, None for waiting forever, return on read
xonxoff=0, #enable software flow control
rtscts=0, #enable RTS/CTS flow control
)
try:
run_forever(rfh, wfh, options, config_opts)
- except VendingException:
+ except VendingException as e:
logging.error("Connection died, trying again...")
+ logging.info("Exception: "+e.__str__())
logging.info("Trying again in 5 seconds.")
sleep(5)