summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/vyos/utils/network.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/utils/network.py b/python/vyos/utils/network.py
index 9eecf97f4..3a26fe193 100644
--- a/python/vyos/utils/network.py
+++ b/python/vyos/utils/network.py
@@ -121,9 +121,9 @@ def get_vrf_members(vrf: str) -> list:
:return: list
"""
interfaces = []
+ if not interface_exists(vrf):
+ return interfaces
try:
- if not interface_exists(vrf):
- raise ValueError(f'VRF "{vrf}" does not exist!')
output = cmdl(['ip', '--json', '--brief', 'link', 'show', 'vrf', vrf])
answer = loads(output)
for data in answer: