summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-03 12:51:27 +0200
committerChristian Poessinger <christian@poessinger.com>2019-09-03 12:51:27 +0200
commitcb9aa5447e79df7d83704a5e039937b72c77177d (patch)
tree9cac884588aa98bf780a432351707ff30acbc929 /python
parent144379775ae8efde4f3290fa08c528977824b285 (diff)
downloadvyos-1x-cb9aa5447e79df7d83704a5e039937b72c77177d.tar.gz
vyos-1x-cb9aa5447e79df7d83704a5e039937b72c77177d.zip
Python/ifconfig: T1557: add message to raised Exceptions
Diffstat (limited to 'python')
-rw-r--r--python/vyos/ifconfig.py4
1 files changed, 2 insertions, 2 deletions
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)