mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-03-09 12:50:23 -05: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 @@ def search_locations(self, fullname):
|
|||
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…
Reference in a new issue