mirror of
https://github.com/beetbox/beets.git
synced 2026-01-30 12:02:41 +01:00
Sound Check parsing: fix odd-length strings
This commit is contained in:
parent
c2a746562a
commit
d50fc378bb
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ def _sc_decode(soundcheck):
|
|||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue