From 69d4d1fa5b397bf591a4d124bb0f1d8106d072df Mon Sep 17 00:00:00 2001 From: Josh Ferrell Date: Mon, 4 Mar 2024 17:22:33 -0500 Subject: Make sure plugins are initialized when using projects --- python/project.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python') diff --git a/python/project.py b/python/project.py index a080123a..67597b56 100644 --- a/python/project.py +++ b/python/project.py @@ -24,6 +24,7 @@ from contextlib import contextmanager from os import PathLike from typing import Callable, List, Optional, Union +import binaryninja from . import _binaryninjacore as core from .exceptions import ProjectException from .metadata import Metadata, MetadataValueType @@ -335,6 +336,7 @@ class Project: :return: Opened project :raises ProjectException: If there was an error opening the project """ + binaryninja._init_plugins() project_handle = core.BNOpenProject(str(path)) if project_handle is None: raise ProjectException("Failed to open project") @@ -350,6 +352,7 @@ class Project: :return: Opened project :raises ProjectException: If there was an error creating the project """ + binaryninja._init_plugins() project_handle = core.BNCreateProject(str(path), name) if project_handle is None: raise ProjectException("Failed to create project") -- cgit v1.3.1