summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-03-10 15:16:35 +0100
committerGitHub <noreply@github.com>2023-03-10 15:16:35 +0100
commiteb4d0ac46bf48e02c07b43cce5ead9ca12b791a4 (patch)
treef1cf6b0ee050df80a397e8254b30e68da9c8bb08 /python/vyos
parent29d27c392274e2d1b5d76690c8fdfee2f55edb00 (diff)
parent9701cbe89dbb22d6d0e95f21eeedb6fc78e196c9 (diff)
downloadvyos-1x-eb4d0ac46bf48e02c07b43cce5ead9ca12b791a4.tar.gz
vyos-1x-eb4d0ac46bf48e02c07b43cce5ead9ca12b791a4.zip
Merge pull request #1884 from sever-sever/T5058
T5058: Fix range_to_regex list argument
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/template.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index 7f417992e..06a292706 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -675,7 +675,10 @@ def range_to_regex(num_range):
if isinstance(num_range, list):
data = []
for entry in num_range:
- data.append(range_to_regex(entry))
+ if '-' not in entry:
+ data.append(entry)
+ else:
+ data.append(range_to_regex(entry))
return f'({"|".join(data)})'
if '-' not in num_range: