From bac089095ae74636e36cb348c21115bd1441116a Mon Sep 17 00:00:00 2001 From: telamonian Date: Thu, 20 Jun 2024 17:06:35 -0400 Subject: [PATCH] fixup logic for getting extension module name in `load_custom_node` --- nodes.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nodes.py b/nodes.py index 39858ae76..b4b1e1f90 100644 --- a/nodes.py +++ b/nodes.py @@ -1887,8 +1887,9 @@ def _load_custom_node(ext_mod, ext_mod_name, ignore, ext_mod_dir=None): def load_custom_node(ext_mod_path, ignore=set()): if os.path.isfile(ext_mod_path): - ext_mod_name, *_ = os.path.splitext(ext_mod_path) - ext_mod_name = NORMALIZE_MOD_NAME(ext_mod_name) + ext_mod_name = NORMALIZE_MOD_NAME(os.path.splitext(ext_mod_path)[0]) + else: + ext_mod_name = NORMALIZE_MOD_NAME(os.path.basename(ext_mod_path)) if ext_mod_name in EXTENSION_MODULES_LOADED: logging.warning(f"Skip loading custom nodes from {ext_mod_path}. Module already loaded.")