Skip to content

Commit 1bccb8a

Browse files
committed
Revert "GP-5298: PyGhidra can now find modules that live in directories specified by the Bundle Manager"
This reverts commit c5d4444.
1 parent e840596 commit 1bccb8a

File tree

1 file changed

+1
-13
lines changed
  • Ghidra/Features/PyGhidra/src/main/py/src/pyghidra

1 file changed

+1
-13
lines changed

Ghidra/Features/PyGhidra/src/main/py/src/pyghidra/launcher.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,6 @@ def create_module(self, spec):
109109
def exec_module(self, fullname):
110110
pass
111111

112-
class _GhidraBundleFinder(importlib.machinery.PathFinder):
113-
""" (internal) Used to find modules in Ghidra bundle locations """
114-
115-
def find_spec(self, fullname, path=None, target=None):
116-
from ghidra.app.script import GhidraScriptUtil
117-
GhidraScriptUtil.acquireBundleHostReference()
118-
for directory in GhidraScriptUtil.getEnabledScriptSourceDirectories():
119-
spec = super().find_spec(fullname, [directory.absolutePath], target)
120-
if spec is not None:
121-
return spec
122-
return None
123112

124113
@contextlib.contextmanager
125114
def _plugin_lock():
@@ -401,9 +390,8 @@ def _setup_java(self, **jpype_kwargs):
401390
**jpype_kwargs
402391
)
403392

404-
# Install hooks into python importlib
393+
# Install hook into python importlib
405394
sys.meta_path.append(_PyGhidraImportLoader())
406-
sys.meta_path.append(_GhidraBundleFinder())
407395

408396
imports.registerDomain("ghidra")
409397

0 commit comments

Comments
 (0)