Merge lp:~rockstar/entertainer/no-open-excepts into lp:entertainer

Proposed by Paul Hummer
Status: Merged
Approved by: Matt Layman
Approved revision: 369
Merged at revision: not available
Proposed branch: lp:~rockstar/entertainer/no-open-excepts
Merge into: lp:entertainer
Diff against target: None lines
To merge this branch: bzr merge lp:~rockstar/entertainer/no-open-excepts
Reviewer Review Type Date Requested Status
Matt Layman Approve
Review via email: mp+6240@code.launchpad.net

Commit message

Specified the music metadata exception catching to not catch every different type of exception.

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

This branch fixes an issue that should have been addressed before Bug 366368 was fixed in Samuel's branch. Basically, in the fix, the branch introduced an open except block. This bug happened because I removed all open excepts to make bugs that were hidden revealed. I made the except more specific, and added a comment to explain WHY the except would happen (which should probably happen when the except is kind of, like a ValueError in this case).

Revision history for this message
Matt Layman (mblayman) wrote :

make check passes to the level expected (failing weather test unrelated to this branch).

Assuming that this was the only exception type that EyeD3 was throwing, I'm okay with this minor change.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'entertainerlib/backend/components/mediacache/music_cache.py'
2--- entertainerlib/backend/components/mediacache/music_cache.py 2009-04-24 20:41:49 +0000
3+++ entertainerlib/backend/components/mediacache/music_cache.py 2009-05-06 01:05:57 +0000
4@@ -253,7 +253,7 @@
5 try:
6 mp3_file = eyeD3.Mp3AudioFile(filename, eyeD3.ID3_ANY_VERSION)
7 tags = mp3_file.getTag()
8- except:
9+ except ValueError: # Tags are corrupt
10 self.logger.error("Couldn't read ID3tags: " + filename)
11 return
12

Subscribers

People subscribed via source and target branches