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:
parent
4fd01e3ac8
commit
783beb165b
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user