diff options
author | Christian Poessinger <christian@poessinger.com> | 2019-09-15 13:52:09 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2019-09-20 21:28:53 +0200 |
commit | 4c2db299625fb3275df12d3174b64428112f3756 (patch) | |
tree | 37010c695eb7ad71f902e9e9013b939c18e5b0c7 /python/vyos | |
parent | 7dd89ff63e34ef0e824df5d15966235c09444c27 (diff) | |
download | vyos-1x-4c2db299625fb3275df12d3174b64428112f3756.tar.gz vyos-1x-4c2db299625fb3275df12d3174b64428112f3756.zip |
Python/ifconfig: T1557: redirect _cmd stderr to stdout
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/ifconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index 507df0d71..398f2ee8f 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -20,7 +20,7 @@ import jinja2 from vyos.validate import * from ipaddress import IPv4Network, IPv6Address from netifaces import ifaddresses, AF_INET, AF_INET6 -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, STDOUT from time import sleep dhcp_cfg = """ @@ -84,7 +84,7 @@ class Interface: print('DEBUG/{:<6} {}'.format(self._ifname, msg)) def _cmd(self, command): - p = Popen(command, stdout=PIPE, shell=True) + p = Popen(command, stdout=PIPE, stderr=STDOUT, shell=True) tmp = p.communicate()[0].strip() self._debug_msg("cmd '{}'".format(command)) if tmp.decode(): |