log the exception causing to revert to the precompiled fallback

Signed-off-by: Brian S. Stephan <bss@incorporeal.org>
This commit is contained in:
Brian S. Stephan 2024-09-16 11:51:52 -05:00
parent 733b49676c
commit 18f4f45bb5
Signed by: bss
GPG Key ID: 3DE06D3180895FCB

View File

@ -65,5 +65,7 @@ def get_config_pb2():
except (ModuleNotFoundError, TypeError):
# (TypeError could be the windows bug https://github.com/protocolbuffers/protobuf/issues/14345)
# that failed, import a precompiled snapshot (may be lagging what's in GP2040-CE)
logger.exception("couldn't compile the proto files for the below reason:")
sys.path.append(os.path.join(pathlib.Path(__file__).parent.resolve(), 'proto_snapshot'))
logger.warning("using the precompiled fallback!")
return importlib.import_module('config_pb2')