Check for correct version of systemd Python library (#60692)

Fix issue where some versions of systemd don't have journal.sendv
pull/69451/head
Rylan Polster 5 years ago committed by GitHub
parent b309c14265
commit eb40ecc843
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- Add an additional check for importing journal from systemd-python module (https://github.com/ansible/ansible/issues/60595).

@ -65,7 +65,9 @@ except ImportError:
try:
from systemd import journal
has_journal = True
# Makes sure that systemd.journal has method sendv()
# Double check that journal has method sendv (some packages don't)
has_journal = hasattr(journal, 'sendv')
except ImportError:
has_journal = False

Loading…
Cancel
Save