From ba130ddb25e2d23d3afc021c7f9cbaa49cd37158 Mon Sep 17 00:00:00 2001 From: Reid Sunderland Date: Tue, 13 Aug 2024 17:00:01 +0000 Subject: [PATCH] AM adaptation for U18.04 servers See https://docs.python.org/3/library/socket.html#socket.timeout socket.timeout has been replaced by TimeoutError. It's only been converted to an alias of TimeoutError since python3.10 --- sarracenia/flowcb/gather/am.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sarracenia/flowcb/gather/am.py b/sarracenia/flowcb/gather/am.py index 6155b5f24..b92a98095 100644 --- a/sarracenia/flowcb/gather/am.py +++ b/sarracenia/flowcb/gather/am.py @@ -159,7 +159,7 @@ def __WaitForRemoteConnections__(self) -> NoReturn: os.set_inheritable(conn.fileno(), True) time.sleep(1) - except TimeoutError: + except (TimeoutError,socket.timeout): n = n * 2 if n > 64: n = 64 logger.info(f"No new connections. Waiting {n} seconds.") @@ -168,6 +168,7 @@ def __WaitForRemoteConnections__(self) -> NoReturn: except Exception as e: logger.error(f"Stopping accept. Exiting. Error message: {e}") + logger.critical("Exception details", exc_info=True) sys.exit(0) # Instance forks