1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #556 from Andru1999/patch-2

Fix issue When you use threading mode
This commit is contained in:
FrankWang 2018-08-08 10:06:49 +08:00 committed by GitHub
commit a46975d038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,6 @@ import time
import re
import sys
import six
import copy
import os
import pickle
@ -1288,8 +1287,7 @@ class TeleBot:
chat_id = message.chat.id
was_poped = False
if chat_id in self.next_step_handlers.keys():
handlers = copy.deepcopy(self.next_step_handlers[chat_id])
self.next_step_handlers.pop(chat_id, None)
handlers = self.next_step_handlers.pop(chat_id, None)
if (handlers):
for handler in handlers:
self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])