mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-04-08 01:43:47 +00:00
Avoid searching disk for plugins when plugins are disabled
This commit is contained in:
parent
37aed891c4
commit
600b2ece36
@ -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…
x
Reference in New Issue
Block a user