summaryrefslogtreecommitdiff
path: root/src/conf_mode/policy-route.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-16 19:22:03 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-16 19:22:03 +0200
commite91af67ff82a228f3571a60a9037f9ef96c84537 (patch)
tree533512a57561b11281210bdf44a17f493454a088 /src/conf_mode/policy-route.py
parent83a2fc901136b9da68f50a5a2c9ae1f45dbf5e97 (diff)
downloadvyos-1x-e91af67ff82a228f3571a60a9037f9ef96c84537.tar.gz
vyos-1x-e91af67ff82a228f3571a60a9037f9ef96c84537.zip
vyos.base: use Warning() helper where applicable
Diffstat (limited to 'src/conf_mode/policy-route.py')
-rwxr-xr-xsrc/conf_mode/policy-route.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conf_mode/policy-route.py b/src/conf_mode/policy-route.py
index 3d1d7d8c5..09d181d43 100755
--- a/src/conf_mode/policy-route.py
+++ b/src/conf_mode/policy-route.py
@@ -20,6 +20,7 @@ import re
from json import loads
from sys import exit
+from vyos.base import Warning
from vyos.config import Config
from vyos.template import render
from vyos.util import cmd
@@ -135,7 +136,7 @@ def verify_rule(policy, name, rule_conf, ipv6):
raise ConfigError(f'Invalid {error_group} "{group_name}" on policy route rule')
if not group_obj:
- print(f'WARNING: {error_group} "{group_name}" has no members')
+ Warning(f'{error_group} "{group_name}" has no members')
if 'port' in side_conf or dict_search_args(side_conf, 'group', 'port_group'):
if 'protocol' not in rule_conf: