#NEWLINE# def decode_list( key , fp ) : #NEWLINE# #INDENT# items_count = read_fmt ( 'I' , fp ) [ 0 ] #NEWLINE# items = [ ] #NEWLINE# for _ in range ( items_count ) : #NEWLINE# #INDENT# ostype = fp . read ( 4 ) #NEWLINE# decode_ostype = get_ostype_decode_func ( ostype ) #NEWLINE# if ( not decode_ostype ) : #NEWLINE# #INDENT# raise UnknownOSType ( ( 'Unknown list item of type %r' % ostype ) ) #NEWLINE# #UNINDENT# value = decode_ostype ( key , fp ) #NEWLINE# if ( value is not None ) : #NEWLINE# #INDENT# items . append ( value ) #NEWLINE# #UNINDENT# #UNINDENT# return List ( items )