mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-01 10:49:58 +03:00
Apply suggestions from code review
This commit is contained in:
parent
d194bb08a3
commit
7143aec152
|
@ -1290,14 +1290,13 @@ def resolve_invite_link(link):
|
|||
|
||||
try:
|
||||
if len(payload) == 12:
|
||||
# New format
|
||||
return 0, *struct.unpack('>LQ', payload)
|
||||
elif len(payload) == 16:
|
||||
# Old Format
|
||||
return struct.unpack('>LLQ', payload)
|
||||
else:
|
||||
raise TypeError
|
||||
pass
|
||||
except (struct.error, TypeError):
|
||||
pass
|
||||
return None, None, None
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user