Formatted code better and added TODO

This commit is contained in:
Rudi Grinberg 2012-10-02 13:30:37 -04:00
parent 30c95f3e9d
commit 4d9fbaf216
2 changed files with 4 additions and 0 deletions

View file

@ -9,6 +9,7 @@ class EventDrainer(Loggable):
"""
def __init__(self, connection, interval=1):
def cb():
# TODO : make 0.3 parameter configurable
try : connection.drain_events(timeout=0.3)
except socket.timeout : pass
except Exception as e :

View file

@ -163,9 +163,12 @@ class Metadata(Loggable):
# Forcing the unicode through
try : fpath = fpath.decode("utf-8")
except : pass
if not mmp.file_playable(fpath): raise BadSongFile(fpath)
try : full_mutagen = mutagen.File(fpath, easy=True)
except Exception : raise BadSongFile(fpath)
self.path = fpath
if not os.path.exists(self.path):
self.logger.info("Attempting to read metadata of file \