File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed
Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change 1616# You should have received a copy of the GNU Lesser General Public License
1717# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818
19- import logging
2019from collections import OrderedDict
2120from datetime import datetime
2221from io import BytesIO
2322from json import JSONEncoder , dumps
2423
2524from ..all import objects
2625
27- log = logging .getLogger (__name__ )
28-
2926
3027class Object :
3128 all = {}
3229
3330 @staticmethod
3431 def read (b : BytesIO , * args ):
35- constructor_id = int .from_bytes (b .read (4 ), "little" )
36-
37- try :
38- return Object .all [constructor_id ].read (b , * args )
39- except KeyError :
40- log .error ("Unknown constructor found: {}. Full data: {}" .format (
41- hex (constructor_id ),
42- b .getvalue ().hex ())
43- )
32+ return Object .all [int .from_bytes (b .read (4 ), "little" )].read (b , * args )
4433
4534 def write (self , * args ) -> bytes :
4635 pass
You can’t perform that action at this time.
0 commit comments