def _pre_load_header(self, fileobj): fileobj.seek(0) id3_location = DSDChunk(fileobj).offset_metdata_chunk if id3_location == 0: raise ID3NoHeaderError("File has no existing ID3 tag") fileobj.seek(id3_location)
def _pre_load_header(self, fileobj): try: fileobj.seek(IFFFile(fileobj)[u'ID3'].data_offset) except (InvalidChunk, KeyError): raise ID3NoHeaderError("No ID3 chunk")