summaryrefslogtreecommitdiff
path: root/python/vyos/compose_config.py
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2024-06-19 20:37:23 -0500
committerJohn Estabrook <jestabro@vyos.io>2024-09-11 11:09:31 -0500
commita79237bb168e611d2965031479d0786b8380e438 (patch)
tree65c264ac2504214bd63be496a2237671d0675aa0 /python/vyos/compose_config.py
parent98314d5c7513b97495e9199baa0be39b6f43f17f (diff)
downloadvyos-1x-a79237bb168e611d2965031479d0786b8380e438.tar.gz
vyos-1x-a79237bb168e611d2965031479d0786b8380e438.zip
migration: T6007: use load_as_module_source for files without extension
(cherry picked from commit 8a57e7b14c818c93655819757d99b69747c9b2ca)
Diffstat (limited to 'python/vyos/compose_config.py')
-rw-r--r--python/vyos/compose_config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/vyos/compose_config.py b/python/vyos/compose_config.py
index b1c277bce..79a8718c5 100644
--- a/python/vyos/compose_config.py
+++ b/python/vyos/compose_config.py
@@ -23,7 +23,7 @@ from typing import TypeAlias, Union, Callable
from vyos.configtree import ConfigTree
from vyos.configtree import deep_copy as ct_deep_copy
-from vyos.utils.system import load_as_module
+from vyos.utils.system import load_as_module_source
ConfigObj: TypeAlias = Union[str, ConfigTree]
@@ -64,7 +64,7 @@ class ComposeConfig:
"""
try:
mod_name = Path(func_file).stem.replace('-', '_')
- mod = load_as_module(mod_name, func_file)
+ mod = load_as_module_source(mod_name, func_file)
func = getattr(mod, func_name)
except Exception as e:
raise ComposeConfigError(f'Error with {func_file}: {e}') from e