mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 14:04:32 +00:00
tools/frr-reload.py: remove stderr redirects
These make no sense. stderr=subprocess.STDOUT means that vtysh's stdout and stderr are combined and returned by check_output. We don't expect errors in that, and we certainly don't log them. Leaving vtysh's stderr as stderr is perfectly fine, it'll be captured for logging just like stderr output from frr-reload.py. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
c572fbfe2d
commit
3fa139a65b
@ -155,7 +155,7 @@ class Config(object):
|
|||||||
try:
|
try:
|
||||||
config_text = subprocess.check_output(
|
config_text = subprocess.check_output(
|
||||||
bindir + "/vtysh --config_dir " + confdir + " -c 'show run " + daemon + "' | /usr/bin/tail -n +4 | " + bindir + "/vtysh --config_dir " + confdir + " -m -f -",
|
bindir + "/vtysh --config_dir " + confdir + " -c 'show run " + daemon + "' | /usr/bin/tail -n +4 | " + bindir + "/vtysh --config_dir " + confdir + " -m -f -",
|
||||||
shell=True, stderr=subprocess.STDOUT)
|
shell=True)
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
ve = VtyshMarkException(e)
|
ve = VtyshMarkException(e)
|
||||||
ve.output = e.output
|
ve.output = e.output
|
||||||
@ -1105,7 +1105,7 @@ def vtysh_config_available(bindir, confdir):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
cmd = [str(bindir + '/vtysh'), '--config_dir', confdir, '-c', 'conf t']
|
cmd = [str(bindir + '/vtysh'), '--config_dir', confdir, '-c', 'conf t']
|
||||||
output = subprocess.check_output(cmd, stderr=subprocess.STDOUT).strip()
|
output = subprocess.check_output(cmd).strip()
|
||||||
|
|
||||||
if 'VTY configuration is locked by other VTY' in output.decode('utf-8'):
|
if 'VTY configuration is locked by other VTY' in output.decode('utf-8'):
|
||||||
print(output)
|
print(output)
|
||||||
@ -1363,7 +1363,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
_ = subprocess.check_output(cmd, stderr=subprocess.STDOUT)
|
_ = subprocess.check_output(cmd)
|
||||||
|
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
|
||||||
@ -1408,7 +1408,7 @@ if __name__ == '__main__':
|
|||||||
fh.write(line + '\n')
|
fh.write(line + '\n')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
subprocess.check_output([str(args.bindir + '/vtysh'), '--config_dir', args.confdir, '-f', filename], stderr=subprocess.STDOUT)
|
subprocess.check_output([str(args.bindir + '/vtysh'), '--config_dir', args.confdir, '-f', filename])
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
log.warning("frr-reload.py failed due to\n%s" % e.output)
|
log.warning("frr-reload.py failed due to\n%s" % e.output)
|
||||||
reload_ok = False
|
reload_ok = False
|
||||||
|
Loading…
Reference in New Issue
Block a user