enhance serial port transport

This commit is contained in:
Gilles Boccon-Gibod
2025-09-25 18:31:14 +02:00
parent 34e0f293c2
commit aa1d7933da
4 changed files with 74 additions and 8 deletions

View File

@@ -131,7 +131,11 @@ def publish_grpc_port(grpc_port: int, instance_number: int) -> bool:
def cleanup():
logger.debug("removing .ini file")
ini_file.unlink()
try:
ini_file.unlink()
except OSError as error:
# Don't log at exception level, since this may happen normally.
logger.debug(f'failed to remove .ini file ({error})')
atexit.register(cleanup)
return True