mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 19:28:54 -05:00
[V3 Downloader] Stop including subpackages in cog list (#2590)
Before this change, `Repo.available_modules` would also contain subpackages, which is unintended
This commit is contained in:
parent
eaeaf9dd69
commit
46413c2c52
@ -173,9 +173,7 @@ class Repo(RepoJSONMixin):
|
||||
Installable(location=name)
|
||||
)
|
||||
"""
|
||||
for file_finder, name, is_pkg in pkgutil.walk_packages(
|
||||
path=[str(self.folder_path)], onerror=lambda name: None
|
||||
):
|
||||
for file_finder, name, is_pkg in pkgutil.iter_modules(path=[str(self.folder_path)]):
|
||||
if is_pkg:
|
||||
curr_modules.append(Installable(location=self.folder_path / name))
|
||||
self.available_modules = curr_modules
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user