Merge pull request #8198 from AchmadFathoni/develop

Fix outdated systemd related exception text.
This commit is contained in:
Matthias 2023-02-20 11:05:42 +01:00 committed by GitHub
commit 352f4962da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ def setup_logging(config: Config) -> None:
try: try:
from cysystemd.journal import JournaldLogHandler from cysystemd.journal import JournaldLogHandler
except ImportError: except ImportError:
raise OperationalException("You need the systemd python package be installed in " raise OperationalException("You need the cysystemd python package be installed in "
"order to use logging to journald.") "order to use logging to journald.")
handler_jd = get_existing_handlers(JournaldLogHandler) handler_jd = get_existing_handlers(JournaldLogHandler)
if handler_jd: if handler_jd:

View File

@ -719,7 +719,7 @@ def test_set_loggers_journald_importerror(import_fails):
'logfile': 'journald', 'logfile': 'journald',
} }
with pytest.raises(OperationalException, with pytest.raises(OperationalException,
match=r'You need the systemd python package.*'): match=r'You need the cysystemd python package.*'):
setup_logging(config) setup_logging(config)
logger.handlers = orig_handlers logger.handlers = orig_handlers