mirror of
https://github.com/yt-dlp/yt-dlp
synced 2025-01-31 12:32:27 +01:00
Avoid searching disk for plugins when plugins are disabled
This commit is contained in:
parent
37aed891c4
commit
600b2ece36
1 changed files with 3 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue