mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #3022 from pypeclub/bugfix/add_example_addons_to_ignored
General: Add example addons to ignored
This commit is contained in:
commit
32f6418c4b
2 changed files with 23 additions and 8 deletions
|
|
@ -37,6 +37,8 @@ IGNORED_DEFAULT_FILENAMES = (
|
|||
"__init__.py",
|
||||
"base.py",
|
||||
"interfaces.py",
|
||||
"example_addons",
|
||||
"default_modules",
|
||||
)
|
||||
|
||||
|
||||
|
|
@ -303,7 +305,16 @@ def _load_modules():
|
|||
fullpath = os.path.join(current_dir, filename)
|
||||
basename, ext = os.path.splitext(filename)
|
||||
|
||||
if not os.path.isdir(fullpath) and ext not in (".py", ):
|
||||
if os.path.isdir(fullpath):
|
||||
# Check existence of init fil
|
||||
init_path = os.path.join(fullpath, "__init__.py")
|
||||
if not os.path.exists(init_path):
|
||||
log.debug((
|
||||
"Module directory does not contan __init__.py file {}"
|
||||
).format(fullpath))
|
||||
continue
|
||||
|
||||
elif ext not in (".py", ):
|
||||
continue
|
||||
|
||||
try:
|
||||
|
|
@ -341,7 +352,16 @@ def _load_modules():
|
|||
fullpath = os.path.join(dirpath, filename)
|
||||
basename, ext = os.path.splitext(filename)
|
||||
|
||||
if not os.path.isdir(fullpath) and ext not in (".py", ):
|
||||
if os.path.isdir(fullpath):
|
||||
# Check existence of init fil
|
||||
init_path = os.path.join(fullpath, "__init__.py")
|
||||
if not os.path.exists(init_path):
|
||||
log.debug((
|
||||
"Module directory does not contan __init__.py file {}"
|
||||
).format(fullpath))
|
||||
continue
|
||||
|
||||
elif ext not in (".py", ):
|
||||
continue
|
||||
|
||||
# TODO add more logic how to define if folder is module or not
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
import os
|
||||
from openpype_modules.ftrack.lib import BaseAction, statics_icon
|
||||
from avalon import lib as avalonlib
|
||||
from openpype.api import (
|
||||
Anatomy,
|
||||
get_project_settings
|
||||
)
|
||||
from openpype.lib import ApplicationManager
|
||||
from openpype.api import Anatomy
|
||||
|
||||
|
||||
class CreateFolders(BaseAction):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue