From 3a255b1aa1827d5193ae7a10274418551eaca77b Mon Sep 17 00:00:00 2001 From: sbuser Date: Fri, 12 Aug 2011 00:57:30 -0500 Subject: [PATCH] Exception handling for MediaFile for debugging. --- headphones/postprocessor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 2b1f87c9..6a9a0310 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -121,7 +121,8 @@ def verify(albumid, albumpath): for downloaded_track in downloaded_track_list: try: f = MediaFile(downloaded_track) - except: + except Exception, e: + logger.info("Exception from MediaFile for: " + downloaded_track + " : " + str(e)) continue if helpers.latinToAscii(f.artist.lower()).encode('UTF-8') == helpers.latinToAscii(release['ArtistName'].lower()).encode('UTF-8') and helpers.latinToAscii(f.album.lower()).encode('UTF-8') == helpers.latinToAscii(release['AlbumTitle'].lower()).encode('UTF-8'): doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list)