Public bug reported:

The module/usr/share/pyshared/mutagen/easyid3.py raises the ValueError
exception instead of the proper KeyError.

Here's an example:
>>> m = EasyID3('ReencarnaciĆ³n - ReencarnaciĆ³n.mp3')
>>> m
{'album': [u'888 Metal'], 'date': [u'1988'], 'artist': [u'Reencarnaci\xf3n'], 
'tracknumber': [u'01'], 'title': [u'Reencarnaci\xf3n (888 Metal)']}
>>> m['date']
[u'1988']
>>> m['year']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/mutagen/easyid3.py", line 94, in 
__getitem__
    else: raise ValueError("%r is not a valid key" % key)
ValueError: 'year' is not a valid key

System information:
j...@shodan bin $ lsb_release -rd
Description:    Ubuntu 9.10
Release:        9.10

j...@shodan bin $ apt-cache policy python-mutagen
python-mutagen:
  Installed: 1.15-2
  Candidate: 1.15-2
  Version table:
 *** 1.15-2 0
        500 http://us.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
Architecture: amd64
Date: Sat Dec 19 12:42:51 2009
DistroRelease: Ubuntu 9.10
InstallationMedia: Kubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
NonfreeKernelModules: nvidia
Package: python-mutagen 1.15-2 [modified: usr/share/pyshared/mutagen/_vorbis.py]
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-16.53-generic
SourcePackage: mutagen
Uname: Linux 2.6.31-16-generic x86_64

** Affects: mutagen (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug

-- 
easyid3.py module raises ValueError instead of KeyError
https://bugs.launchpad.net/bugs/498610
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to