mirror of
https://github.com/systemd/systemd.git
synced 2025-01-06 17:18:12 +03:00
test-network: merge stdout and stderr of invoked command by call()
Otherwise, the logs may be messed up.
This commit is contained in:
parent
90bc309aa2
commit
b5dac5b0de
@ -97,9 +97,9 @@ def check_output(*command, text=True, **kwargs):
|
||||
return subprocess.run(command, check=True, universal_newlines=text, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kwargs).stdout.rstrip()
|
||||
|
||||
def call(*command, text=True, **kwargs):
|
||||
# This returns returncode. stdout and stderr are shown in console
|
||||
# This returns returncode. stdout and stderr are merged and shown in console
|
||||
command = command[0].split() + list(command[1:])
|
||||
return subprocess.run(command, check=False, universal_newlines=text, **kwargs).returncode
|
||||
return subprocess.run(command, check=False, universal_newlines=text, stderr=subprocess.STDOUT, **kwargs).returncode
|
||||
|
||||
def call_quiet(*command, text=True, **kwargs):
|
||||
command = command[0].split() + list(command[1:])
|
||||
|
Loading…
Reference in New Issue
Block a user