mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Fix objects failing to print in case there's no __slots__ attribute
This commit is contained in:
parent
b6f508711a
commit
506253e506
@ -50,7 +50,7 @@ class Object(metaclass=Meta):
|
||||
else (attr, str(datetime.fromtimestamp(getattr(obj, attr))))
|
||||
if attr.endswith("date")
|
||||
else (attr, getattr(obj, attr))
|
||||
for attr in obj.__slots__
|
||||
for attr in getattr(obj, "__slots__", [])
|
||||
if getattr(obj, attr) is not None
|
||||
]
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user