Pull requests

#2 Merged
Repository
boukeversteegh boukeversteegh
Branch
default
Repository
nicfit nicfit
Branch
default

BUGFIX: ValueError when parsing invalid ID3 PRIV header

Author
  1. Bouke Versteegh
Reviewers
Description

In id3/frames.py: PrivateFrame(Frame), the following line caused an Exception if data is missing \x00 delimiter.

    self.owner_id, self.owner_data = self.data.split('\x00', 1)

Fixed it like this:

    try:
        self.owner_id, self.owner_data = self.data.split('\x00', 1)
    except ValueError:
        # If data doesn't contain required \x00
        # all data is taken to be owner_id
        self.owner_id = self.data

Comments (1)