mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Merge f22b68b3fb into cb38d6a02b
This commit is contained in:
commit
cf09178bfc
1 changed files with 4 additions and 3 deletions
|
|
@ -46,7 +46,8 @@ from pyrogram.errors import CDNFileHashMismatch
|
||||||
from pyrogram.errors import (
|
from pyrogram.errors import (
|
||||||
SessionPasswordNeeded,
|
SessionPasswordNeeded,
|
||||||
VolumeLocNotFound, ChannelPrivate,
|
VolumeLocNotFound, ChannelPrivate,
|
||||||
BadRequest, ChannelInvalid, PersistentTimestampInvalid, PersistentTimestampOutdated
|
BadRequest, ChannelInvalid, PersistentTimestampInvalid, PersistentTimestampOutdated,
|
||||||
|
FloodWait, FloodPremiumWait
|
||||||
)
|
)
|
||||||
from pyrogram.handlers.handler import Handler
|
from pyrogram.handlers.handler import Handler
|
||||||
from pyrogram.methods import Methods
|
from pyrogram.methods import Methods
|
||||||
|
|
@ -1136,7 +1137,7 @@ class Client(Methods):
|
||||||
if isinstance(e, asyncio.CancelledError):
|
if isinstance(e, asyncio.CancelledError):
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
if isinstance(e, pyrogram.errors.FloodWait):
|
if isinstance(e, (FloodWait, FloodPremiumWait)):
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
@ -1361,7 +1362,7 @@ class Client(Methods):
|
||||||
await cdn_session.stop()
|
await cdn_session.stop()
|
||||||
except pyrogram.StopTransmission:
|
except pyrogram.StopTransmission:
|
||||||
raise
|
raise
|
||||||
except pyrogram.errors.FloodWait:
|
except (FloodWait, FloodPremiumWait):
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.exception(e)
|
log.exception(e)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue