diff options
-rw-r--r-- | python/vyos/template.py | 5 |
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: |