Avoid searching disk for plugins when plugins are disabled

pull/11305/head
coletdjnz 3 months ago
parent 37aed891c4
commit 600b2ece36
No known key found for this signature in database
GPG Key ID: 91984263BB39894A

@ -158,6 +158,9 @@ class PluginFinder(importlib.abc.MetaPathFinder):
write_string(f'Permission error while accessing modules in "{e.filename}"\n')
def find_spec(self, fullname, path=None, target=None):
if not plugins_enabled.value:
return None
if fullname not in self.packages:
return None

Loading…
Cancel
Save