diff --git a/lacre/__init__.py b/lacre/__init__.py index 0ee35c3..11fe111 100644 --- a/lacre/__init__.py +++ b/lacre/__init__.py @@ -43,7 +43,9 @@ EX_CONFIG = 78 def init_logging(config_filename): if config_filename is not None: logging.config.fileConfig(config_filename) + logging.captureWarnings(True) logging.info('Configured from %s', config_filename) else: logging.config.dictConfig(FAIL_OVER_LOGGING_CONFIG) + logging.captureWarnings(True) logging.warning('Lacre logging configuration missing, using syslog as default') diff --git a/requirements.txt b/requirements.txt index 83bb7f4..8cfe8e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ aiosmtpd==1.4.2 -SQLAlchemy==1.4.32 +SQLAlchemy==2.0.29 Markdown==3.4.1 M2Crypto==0.38.0 requests==2.27.1 diff --git a/test/utils/relay.py b/test/utils/relay.py index 7189668..2f363cc 100644 --- a/test/utils/relay.py +++ b/test/utils/relay.py @@ -101,6 +101,8 @@ def _serve(port) -> bytes: logging.debug('Received %d bytes of data', len(message)) + s.close() + # Trim EOM marker as we're only interested in the message body. return message[:-len(EOM)]