mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
test: print an error when networkctl returns an unexpected EC
If networkctl crashes, like recently with SIGABRT, it returns absolutely no output, which may be confusing during debugging. Help it a little with a short informative message.
This commit is contained in:
parent
2de705cd1c
commit
345997f393
@ -420,7 +420,9 @@ DHCP={}
|
||||
subprocess.call(['ip', 'a', 'show', 'dev', self.iface])
|
||||
print('---- networkctl status {} ----'.format(self.iface))
|
||||
sys.stdout.flush()
|
||||
subprocess.call(['networkctl', 'status', self.iface])
|
||||
rc = subprocess.call(['networkctl', 'status', self.iface])
|
||||
if rc != 0:
|
||||
print("'networkctl status' exited with an unexpected code {}".format(rc))
|
||||
self.show_journal('systemd-networkd.service')
|
||||
self.print_server_log()
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user