mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 19:12:29 +00:00
Make exception types correspond to Python docs
This commit is contained in:
@@ -97,7 +97,8 @@ class TLObject:
|
||||
if isinstance(data, str):
|
||||
data = data.encode('utf-8')
|
||||
else:
|
||||
raise ValueError('bytes or str expected, not', type(data))
|
||||
raise TypeError(
|
||||
'bytes or str expected, not {}'.format(type(data)))
|
||||
|
||||
r = []
|
||||
if len(data) < 254:
|
||||
|
Reference in New Issue
Block a user