mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
More consistent with asyncio branch (style/small fixes)
Like passing an extra (invalid) dt parameter when serializing a datetime, and handling more errors in the TcpClient class.
This commit is contained in:
@@ -192,10 +192,10 @@ def get_inner_text(text, entity):
|
||||
:param entity: the entity or entities that must be matched.
|
||||
:return: a single result or a list of the text surrounded by the entities.
|
||||
"""
|
||||
if not isinstance(entity, TLObject) and hasattr(entity, '__iter__'):
|
||||
if isinstance(entity, TLObject):
|
||||
entity = (entity,)
|
||||
multiple = True
|
||||
else:
|
||||
entity = [entity]
|
||||
multiple = False
|
||||
|
||||
text = text.encode(ENC)
|
||||
|
Reference in New Issue
Block a user