Package: python-mutagen
Version: 1.11-1

The error shown when a file doesn't exist is pretty horrible.  Are you
going to check whether the file exists and throw a proper exception
I can catch in my script, or should I catch UnboundLocalError?


>>> import mutagen.flac as flac
>>> flac.FLAC("/home/tbm/tmp/abcde/Various-The_Vibe_History_of_Hip_Hop/The_Vibe_History_of_Hip_Hop.flac")
{'album': [u'The Vibe History of Hip Hop'], 'artist': [u'Various'], 'title': 
[u'The Vibe History of Hip Hop'], 'cddb': [u'2c041404'], 'date': [u'1999'], 
'genre': [u'Hip-Hop'], 'tracknumber': [u'1']}
>>>
>>> flac.FLAC("/home/tbm/tmp/abcde/Various-The_Vibe_History_of_Hip_Hop/The_Vibe_History_of_Hip_Hop.flac")
{'album': [u'The Vibe History of Hip Hop'], 'artist': [u'Various'], 'title': 
[u'The Vibe History of Hip Hop'], 'cddb': [u'2c041404'], 'date': [u'1999'], 
'genre': [u'Hip-Hop'], 'tracknumber': [u'1']}
>>> flac.FLAC("D")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/mutagen/__init__.py", line 75, in 
__init__
    self.load(filename, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/mutagen/flac.py", line 571, in load
    fileobj.close()
UnboundLocalError: local variable 'fileobj' referenced before assignment
>>>

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to