mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-02 11:10:18 +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:
|
try:
|
||||||
if len(payload) == 12:
|
if len(payload) == 12:
|
||||||
# New format
|
|
||||||
return 0, *struct.unpack('>LQ', payload)
|
return 0, *struct.unpack('>LQ', payload)
|
||||||
elif len(payload) == 16:
|
elif len(payload) == 16:
|
||||||
# Old Format
|
|
||||||
return struct.unpack('>LLQ', payload)
|
return struct.unpack('>LLQ', payload)
|
||||||
else:
|
else:
|
||||||
raise TypeError
|
pass
|
||||||
except (struct.error, TypeError):
|
except (struct.error, TypeError):
|
||||||
|
pass
|
||||||
return None, None, None
|
return None, None, None
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user