mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
use same name for both sys module and module
This commit is contained in:
parent
c398e1fca3
commit
cdb719494e
1 changed files with 4 additions and 4 deletions
|
|
@ -260,15 +260,15 @@ def publish_plugins_discover(
|
|||
|
||||
dirpath_hash = hashlib.md5(path.encode("utf-8")).hexdigest()
|
||||
for filename in filenames:
|
||||
mod_name, mod_ext = os.path.splitext(filename)
|
||||
if mod_ext.lower() != ".py":
|
||||
basename, ext = os.path.splitext(filename)
|
||||
if ext.lower() != ".py":
|
||||
continue
|
||||
|
||||
filepath = os.path.join(path, filename)
|
||||
sys_module_name = f"{dirpath_hash}.{mod_name}"
|
||||
module_name = f"{dirpath_hash}.{basename}"
|
||||
try:
|
||||
module = import_filepath(
|
||||
filepath, mod_name, sys_module_name=sys_module_name
|
||||
filepath, module_name, sys_module_name=module_name
|
||||
)
|
||||
|
||||
except Exception as err: # noqa: BLE001
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue