1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-22 13:33:56 +03:00

tools: make update-dbus-docs compatible with Python 3.6

668b3a42fe allowed update-dbus-docs.py to start
running on Cent OS 8 (instead of skipping). But subprocess.check_output()'s
text argument didn't exist until Python 3.7 and C8 is still running
Python 3.6. Use universal_newlines instead for backwards compatibility.
This commit is contained in:
Anita Zhang 2021-01-31 19:04:34 -08:00 committed by Luca Boccassi
parent a3c5d7e95b
commit 934d0d023e

View File

@ -197,7 +197,7 @@ def subst_output(document, programlisting, stats):
print(f'COMMAND: {shlex_join(argv)}')
try:
out = subprocess.check_output(argv, text=True)
out = subprocess.check_output(argv, universal_newlines=True)
except FileNotFoundError:
print(f'{executable} not found, ignoring', file=sys.stderr)
return