Merge "When ouputting to /dev/null should open in write mode"

This commit is contained in:
Zuul 2018-02-07 21:45:49 +00:00 committed by Gerrit Code Review
commit de32d66ce3
1 changed files with 1 additions and 1 deletions

View File

@ -313,7 +313,7 @@ def is_journalctl_present():
:returns: True if journalctl is present, False if not.
"""
try:
devnull = open(os.devnull)
devnull = open(os.devnull, 'w')
subprocess.check_call(['journalctl', '--version'], stdout=devnull,
stderr=devnull)
except OSError as e: