1
0
Fork 0
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:
coletdjnz 2024-11-30 14:05:58 +13:00
parent 37aed891c4
commit 600b2ece36
No known key found for this signature in database
GPG key ID: 91984263BB39894A

View file

@ -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