mirror of
https://github.com/paul-nameless/tg
synced 2025-02-16 10:38:23 +00:00
Use discard on set instead of catching exception
This commit is contained in:
parent
718bf5a7a7
commit
7fca99e377
1 changed files with 1 additions and 4 deletions
|
@ -336,10 +336,7 @@ class MsgModel:
|
|||
]
|
||||
msg_set = self.msg_ids[chat_id]
|
||||
for msg_id in msg_ids:
|
||||
try:
|
||||
msg_set.remove(msg_id)
|
||||
except KeyError:
|
||||
continue
|
||||
msg_set.discard(msg_id)
|
||||
|
||||
def update_msg_content_opened(self, chat_id: int, msg_id: int) -> None:
|
||||
for message in self.msgs[chat_id]:
|
||||
|
|
Loading…
Add table
Reference in a new issue