summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/interfaceconfig.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/interfaceconfig.py b/python/vyos/interfaceconfig.py
index c10f76e52..c40912e3c 100644
--- a/python/vyos/interfaceconfig.py
+++ b/python/vyos/interfaceconfig.py
@@ -35,8 +35,8 @@ class Interface:
if not os.path.exists('/sys/class/net/{0}'.format(ifname)):
try:
- ret = subprocess.check_output(
- ['ip link add dev ' + str(ifname) + ' type ' + type], stderr=subprocess.STDOUT, shell=True).decode()
+ cmd = 'ip link add dev "{}" type "{}"'.format(ifname, type)
+ self._cmd(cmd)
except subprocess.CalledProcessError as e:
if self._debug():
self._debug(e)