Skip to content

Commit

Permalink
AM adaptation for U18.04 servers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
reidsunderland committed Aug 13, 2024
1 parent 94618b4 commit ba130dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sarracenia/flowcb/gather/am.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")
Expand All @@ -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
Expand Down

0 comments on commit ba130dd

Please sign in to comment.