Skip to content

Commit

Permalink
Add support for plugin directories
Browse files Browse the repository at this point in the history
  • Loading branch information
Schamper committed Aug 5, 2024
1 parent 84e83ea commit 976c44e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dissect/target/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,10 @@ def register(plugincls: type[Plugin]) -> None:
exports = []
functions = []
module_path = _module_path(plugincls)

if module_path.endswith("._plugin"):
module_path = module_path[:-8]

module_key = f"{module_path}.{plugincls.__qualname__}"

if not issubclass(plugincls, ChildTargetPlugin):
Expand Down

0 comments on commit 976c44e

Please sign in to comment.