mirror of https://github.com/coddrago/Heroku
Fix await issue
parent
f27e5fbdf5
commit
1e7de51618
|
@ -856,7 +856,7 @@ class LoaderMod(loader.Module):
|
|||
)
|
||||
|
||||
if pack_url and (
|
||||
transations := self.allmodules.translator.load_module_translations(
|
||||
transations := await self.allmodules.translator.load_module_translations(
|
||||
pack_url
|
||||
)
|
||||
):
|
||||
|
|
|
@ -97,10 +97,7 @@ class BaseTranslator:
|
|||
|
||||
async def load_module_translations(self, pack_url: str) -> typing.Union[bool, dict]:
|
||||
try:
|
||||
data = self._get_pack_raw(
|
||||
(await utils.run_sync(requests.get, pack_url)).text,
|
||||
pack_url.split(".")[-1],
|
||||
)
|
||||
data = yaml.load((await utils.run_sync(requests.get, pack_url)).text)
|
||||
except Exception:
|
||||
logger.exception("Unable to decode %s", pack_url)
|
||||
return False
|
||||
|
|
Loading…
Reference in New Issue