mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-07 03:38:53 -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)
|
Installable(location=name)
|
||||||
)
|
)
|
||||||
"""
|
"""
|
||||||
for file_finder, name, is_pkg in pkgutil.walk_packages(
|
for file_finder, name, is_pkg in pkgutil.iter_modules(path=[str(self.folder_path)]):
|
||||||
path=[str(self.folder_path)], onerror=lambda name: None
|
|
||||||
):
|
|
||||||
if is_pkg:
|
if is_pkg:
|
||||||
curr_modules.append(Installable(location=self.folder_path / name))
|
curr_modules.append(Installable(location=self.folder_path / name))
|
||||||
self.available_modules = curr_modules
|
self.available_modules = curr_modules
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user