summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-03 12:49:33 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-03 12:49:33 +0200
commit144379775ae8efde4f3290fa08c528977824b285 (patch)
treea8e3a729da073f384437dc024d225f1e09303854 /python
parent8b2e1f9a9c493b2d04513f83e154c092df66f761 (diff)
downloadvyos-1x-144379775ae8efde4f3290fa08c528977824b285.tar.gz
vyos-1x-144379775ae8efde4f3290fa08c528977824b285.zip
Python/ifconfig: T1556: bridge: no need to manually generate an exception
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py
index 786753b8c..b25d84f26 100644
--- a/python/vyos/ifconfig.py
+++ b/python/vyos/ifconfig.py
@@ -907,9 +907,6 @@ class BridgeIf(Interface):
>>> BridgeIf('br0').add_port('eth0')
>>> BridgeIf('br0').add_port('eth1')
"""
- if not interface:
- raise ValueError('No interface address specified')
-
cmd = 'ip link set dev "{}" master "{}"'.format(interface, self._ifname)
self._cmd(cmd)
@@ -923,9 +920,6 @@ class BridgeIf(Interface):
>>> from vyos.ifconfig import Interface
>>> BridgeIf('br0').del_port('eth1')
"""
- if not interface:
- raise ValueError('No interface address specified')
-
cmd = 'ip link set dev "{}" nomaster'.format(interface)
self._cmd(cmd)