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

Improved code readability

This commit is contained in:
coder2020official 2022-10-01 22:32:41 +04:00
parent 27e0197855
commit b523cec22f
2 changed files with 1 additions and 4 deletions

View File

@ -949,12 +949,11 @@ class TeleBot:
if restart_on_change:
self._setup_change_detector(path_to_watch)
restart_on_change = False
while not self.__stop_polling.is_set():
try:
self.polling(non_stop=True, timeout=timeout, long_polling_timeout=long_polling_timeout,
logger_level=logger_level, allowed_updates=allowed_updates, restart_on_change=restart_on_change,
logger_level=logger_level, allowed_updates=allowed_updates, restart_on_change=False,
*args, **kwargs)
except Exception as e:
if logger_level and logger_level >= logging.ERROR:

View File

@ -350,8 +350,6 @@ class AsyncTeleBot:
self._polling = True
if restart_on_change:
restart_on_change = False
self._setup_change_detector(path_to_watch)
while self._polling: