Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip lost+found directory #795

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions core/cat/mad_hatter/mad_hatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,17 @@ def find_plugins(self):
log.info("ACTIVE PLUGINS:")
log.info(self.active_plugins)

# Directories to skip
skip_directories = ['lost+found']
Copy link

@matteocacciola matteocacciola Oct 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about skipping __pycache__ as well? what about naming the variable as skip_folder, just for naming consistency?


# discover plugins, folder by folder
for folder in all_plugin_folders:
self.load_plugin(folder)

plugin_id = os.path.basename(os.path.normpath(folder))

if plugin_id in skip_directories:
continue

self.load_plugin(folder)

if plugin_id in self.active_plugins:
self.plugins[plugin_id].activate()
Expand Down Expand Up @@ -300,4 +306,4 @@ def get_plugin(self):

@property
def procedures(self):
return self.tools + self.forms
return self.tools + self.forms