mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-07-11 16:42:28 +03:00
Fix UserList not being considered a list
This commit is contained in:
parent
4de811b8cb
commit
363e751f48
|
@ -6,6 +6,7 @@ import math
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import re
|
import re
|
||||||
import types
|
import types
|
||||||
|
from collections import UserList
|
||||||
from mimetypes import add_type, guess_extension
|
from mimetypes import add_type, guess_extension
|
||||||
|
|
||||||
from .tl.types import (
|
from .tl.types import (
|
||||||
|
@ -342,7 +343,8 @@ def is_list_like(obj):
|
||||||
enough. Things like open() are also iterable (and probably many
|
enough. Things like open() are also iterable (and probably many
|
||||||
other things), so just support the commonly known list-like objects.
|
other things), so just support the commonly known list-like objects.
|
||||||
"""
|
"""
|
||||||
return isinstance(obj, (list, tuple, set, dict, types.GeneratorType))
|
return isinstance(obj, (list, tuple, set, dict,
|
||||||
|
UserList, types.GeneratorType))
|
||||||
|
|
||||||
|
|
||||||
def parse_phone(phone):
|
def parse_phone(phone):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user