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()
|
dirpath_hash = hashlib.md5(path.encode("utf-8")).hexdigest()
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
mod_name, mod_ext = os.path.splitext(filename)
|
basename, ext = os.path.splitext(filename)
|
||||||
if mod_ext.lower() != ".py":
|
if ext.lower() != ".py":
|
||||||
continue
|
continue
|
||||||
|
|
||||||
filepath = os.path.join(path, filename)
|
filepath = os.path.join(path, filename)
|
||||||
sys_module_name = f"{dirpath_hash}.{mod_name}"
|
module_name = f"{dirpath_hash}.{basename}"
|
||||||
try:
|
try:
|
||||||
module = import_filepath(
|
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
|
except Exception as err: # noqa: BLE001
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue