Merge branch 'master' of github.com:LonamiWebs/Telethon

This commit is contained in:
Lonami Exo
2017-12-28 01:17:30 +01:00
10 changed files with 34 additions and 37 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ class Draft:
@classmethod
def _from_update(cls, client, update):
if not isinstance(update, UpdateDraftMessage):
raise ValueError(
raise TypeError(
'You can only create a new `Draft` from a corresponding '
'`UpdateDraftMessage` object.'
)
+2 -1
View File
@@ -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: