File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
pyrogram/raw/core/primitives Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -31,21 +31,19 @@ class Vector(bytes, TLObject):
3131 # i.e., RpcResult body starts with 0x1cb5c415 (Vector Id) - e.g., messages.GetMessagesViews.
3232 @staticmethod
3333 def read_bare (b : BytesIO , size : int ) -> Union [int , Any ]:
34- try :
35- return TLObject .read (b )
36- except KeyError :
37- b .seek (- 4 , 1 )
34+ if size == 4 :
35+ return Int .read (b )
36+
37+ if size == 8 :
38+ return Long .read (b )
3839
39- if size == 4 :
40- return Int .read (b )
41- else :
42- return Long .read (b )
40+ return TLObject .read (b )
4341
4442 @classmethod
4543 def read (cls , data : BytesIO , t : Any = None , * args : Any ) -> List :
4644 count = Int .read (data )
4745 left = len (data .read ())
48- size = (left // count ) if count else 0
46+ size = (left / count ) if count else 0
4947 data .seek (- left , 1 )
5048
5149 return List (
You can’t perform that action at this time.
0 commit comments