mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[Downloader] Move author key handling to RepoJSONMixin, fix NameError (#3285)
* Update downloader.py * Update json_mixins.py * Update installable.py * changelog pt 1 * changelog pt2 * edit of changelog pt1 * edit of changelog pt 2 (last commit before review) * Kidding, this is the last one before review.
This commit is contained in:
@@ -9,7 +9,7 @@ class RepoJSONMixin:
|
||||
def __init__(self, repo_folder: Path):
|
||||
self._repo_folder = repo_folder
|
||||
|
||||
self.author: Optional[Tuple[str, ...]] = None
|
||||
self.author: Tuple[str, ...] = ()
|
||||
self.install_msg: Optional[str] = None
|
||||
self.short: Optional[str] = None
|
||||
self.description: Optional[str] = None
|
||||
@@ -32,7 +32,12 @@ class RepoJSONMixin:
|
||||
else:
|
||||
self._info = info
|
||||
|
||||
self.author = info.get("author")
|
||||
try:
|
||||
author = tuple(info.get("author", []))
|
||||
except ValueError:
|
||||
author = ()
|
||||
self.author = author
|
||||
|
||||
self.install_msg = info.get("install_msg")
|
||||
self.short = info.get("short")
|
||||
self.description = info.get("description")
|
||||
|
||||
Reference in New Issue
Block a user