From 8abbd77a9fbaf75b7fc8002385d444acf56726b6 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sun, 8 Nov 2026 19:53:38 +0100 Subject: wwan: T9388: import the WWAN route helpers only where they are used The configuration dictionary helpers are imported by nearly every configuration script, but only the collection of WWAN default routes needs the WWAN helpers and the XML default values. Import them there instead of at module level. --- python/vyos/configdict.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py index a623e419b..359315ba3 100644 --- a/python/vyos/configdict.py +++ b/python/vyos/configdict.py @@ -23,8 +23,6 @@ from vyos.config import Config from vyos.config import ConfigDict from vyos.utils.dict import dict_search from vyos.utils.process import cmdl -from vyos.utils.wwan import bearer_families -from vyos.xml_ref import default_value def retrieve_config(path_hash, base_path, config): """ @@ -487,6 +485,9 @@ def get_wwan_interfaces(conf, vrf=None): """Common helper function to retrieve all WWAN interfaces from the current CLI session that can get an address from the bearer of their modem and thus contribute a default route.""" + from vyos.utils.wwan import bearer_families + from vyos.xml_ref import default_value + wwan_interfaces = {} conf.set_level([]) # required for list_nodes() for ifname in conf.list_nodes(['interfaces', 'wwan']): -- cgit v1.2.3