From cb9aa5447e79df7d83704a5e039937b72c77177d Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 3 Sep 2019 12:51:27 +0200 Subject: Python/ifconfig: T1557: add message to raised Exceptions --- python/vyos/ifconfig.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/vyos/ifconfig.py') diff --git a/python/vyos/ifconfig.py b/python/vyos/ifconfig.py index b25d84f26..10653c645 100644 --- a/python/vyos/ifconfig.py +++ b/python/vyos/ifconfig.py @@ -287,7 +287,7 @@ class Interface: return self._write_sysfs('/proc/sys/net/ipv4/conf/{0}/link_filter' .format(self._ifname), link_filter) else: - raise ValueError() + raise ValueError("Value out of range") @property @@ -989,7 +989,7 @@ class BondIf(Interface): '1' """ if not mode in ['layer2', 'layer2+3', 'layer3+4', 'encap2+3', 'encap3+4']: - raise ValueError() + raise ValueError("Value out of range") return self._write_sysfs('/sys/class/net/{}/bonding/xmit_hash_policy' .format(self._ifname), mode) -- cgit v1.2.3