#NEWLINE# def read( self , r ) : #NEWLINE# #INDENT# size = r . get_int ( ) #NEWLINE# if ( size == 0 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# type_id = r . get_byte ( ) #NEWLINE# prop_bytes = r . get_byte ( ) #NEWLINE# type_factory = self . _type_map . get ( type_id ) #NEWLINE# if ( not type_factory ) : #NEWLINE# #INDENT# r . session . bad_stream ( 'Variant type invalid' , type_id ) #NEWLINE# #UNINDENT# return type_factory ( r , ( ( type_id - prop_bytes ) - 2 ) )