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

raise other exceptions in antiflood

This commit is contained in:
orocane 2022-09-10 15:59:40 +08:00
parent 4fd01e3ac8
commit 783beb165b

View File

@ -654,6 +654,10 @@ def antiflood(function: Callable, *args, **kwargs):
if ex.error_code == 429: if ex.error_code == 429:
sleep(ex.result_json['parameters']['retry_after']) sleep(ex.result_json['parameters']['retry_after'])
msg = function(*args, **kwargs) msg = function(*args, **kwargs)
else:
raise
except:
raise
finally: finally:
return msg return msg