From 494b535a9127c769401791c8acb7a1d1443560a0 Mon Sep 17 00:00:00 2001 From: Andru1999 Date: Wed, 8 Aug 2018 10:46:23 +1000 Subject: [PATCH] Fix issue When you use threading mode --- telebot/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/telebot/__init__.py b/telebot/__init__.py index f520ead..320601c 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -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"])