Converted prints into logging

This commit is contained in:
jtc42 2019-07-15 17:49:25 +01:00
parent 8be2c8eae7
commit 204d66f3cc

View file

@ -271,10 +271,10 @@ class ExtensibleSerialInstrument(object):
success = False success = False
for port_name, _, _ in serial.tools.list_ports.comports(): #loop through serial ports, apparently 256 is the limit?! for port_name, _, _ in serial.tools.list_ports.comports(): #loop through serial ports, apparently 256 is the limit?!
try: try:
print("Trying port",port_name) logging.info("Trying port",port_name)
self.open(port_name) self.open(port_name)
success = True success = True
print("Success!") logging.info("Success!")
except: except:
pass pass
finally: finally: