cleanup fixme

This commit is contained in:
Kevin Hester
2021-02-26 15:55:46 +08:00
parent cfe63d17ef
commit 17da6f464d
4 changed files with 17 additions and 13 deletions

View File

@@ -7,6 +7,17 @@ import serial.tools.list_ports
blacklistVids = dict.fromkeys([0x1366])
def fixme(message):
raise Exception(f"FIXME: {message}")
def catchAndIgnore(reason, closure):
"""Call a closure but if it throws an excpetion print it and continue"""
try:
closure()
except BaseException as ex:
logging.error(f"Exception thrown in {reason}: {ex}")
def findPorts():
"""Find all ports that might have meshtastic devices