Commits

Adrian Sampson  committed 9438f43

Sound Check parsing: fix odd-length strings

  • Participants
  • Parent commits 196803e

Comments (0)

Files changed (1)

File beets/mediafile.py

     try:
         soundcheck = soundcheck.replace(' ', '').decode('hex')
         soundcheck = struct.unpack('!iiiiiiiiii', soundcheck)
-    except struct.error:
+    except (struct.error, TypeError):
         # SoundCheck isn't in the format we expect, so return default
         # values.
         return 0.0, 0.0