mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-28 00:24:13 +00:00
🚑 hotfix: listen KeyError bug
This commit is contained in:
parent
a3ee603cd2
commit
f66530ac87
@ -18,7 +18,9 @@ You should have received a copy of the GNU General Public License
|
||||
along with pyromod. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
|
||||
import asyncio
|
||||
import contextlib
|
||||
import functools
|
||||
from typing import Optional, List, Union
|
||||
|
||||
@ -70,6 +72,7 @@ class Client:
|
||||
|
||||
@patchable
|
||||
def clear_listener(self, chat_id, future):
|
||||
with contextlib.suppress(KeyError):
|
||||
if future == self.listening[chat_id]["future"]:
|
||||
self.listening.pop(chat_id, None)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user