Fix some potential exceptions when asyncio.gathering

This commit is contained in:
Tulir Asokan
2019-09-02 22:21:48 +03:00
parent fbb1267609
commit 3c2268870b
4 changed files with 13 additions and 3 deletions
+6
View File
@@ -226,6 +226,12 @@ class Puppet(CustomPuppetMixin):
return name
return cls.displayname_template.format_full(name)
async def try_update_info(self, source: 'AbstractUser', info: User) -> None:
try:
await self.update_info(source, info)
except Exception:
source.log.exception(f"Failed to update info of {self.tgid}")
async def update_info(self, source: 'AbstractUser', info: User) -> None:
if self.disable_updates:
return