def load(self, filename):
self.metadata_blocks = []<EOL>self.tags = None<EOL>self.cuesheet = None<EOL>self.seektable = None<EOL>self.filename = filename<EOL>fileobj = StrictFileObject(open(filename, "<STR_LIT:rb>"))<EOL>try:<EOL><INDENT>self.__check_header(fileobj)<EOL>while self.__read_metadata_block(fileobj):<EOL><INDENT>pass<EOL><DEDENT><DEDENT>finally:<EOL><INDENT>fileobj.close()<EOL><DEDENT>try:<EOL><INDENT>self.metadata_blocks[<NUM_LIT:0>].length<EOL><DEDENT>except (AttributeError, IndexError):<EOL><INDENT>raise FLACNoHeaderError("<STR_LIT>")<EOL><DEDENT>
Load file information from a filename.