Merge branch 'cc-3936' into devel
This commit is contained in:
commit
ff24c156e8
|
@ -57,4 +57,7 @@ class EventContractor(Loggable):
|
||||||
|
|
||||||
def __unregister(self, evt):
|
def __unregister(self, evt):
|
||||||
try: del self.store[evt.path]
|
try: del self.store[evt.path]
|
||||||
|
except KeyError as e:
|
||||||
|
self.logger.info("Contractor failed to unrecord event: '%s'" \
|
||||||
|
% evt.path)
|
||||||
except Exception as e: self.unexpected_exception(e)
|
except Exception as e: self.unexpected_exception(e)
|
||||||
|
|
|
@ -154,6 +154,11 @@ class Metadata(Loggable):
|
||||||
try : full_mutagen = mutagen.File(fpath, easy=True)
|
try : full_mutagen = mutagen.File(fpath, easy=True)
|
||||||
except Exception : raise BadSongFile(fpath)
|
except Exception : raise BadSongFile(fpath)
|
||||||
self.path = fpath
|
self.path = fpath
|
||||||
|
if not os.path.exists(self.path):
|
||||||
|
self.logger.info("Attempting to read metadata of file \
|
||||||
|
that does not exist. Setting metadata to {}")
|
||||||
|
self.__metadata = {}
|
||||||
|
return
|
||||||
# TODO : Simplify the way all of these rules are handled right not it's
|
# TODO : Simplify the way all of these rules are handled right not it's
|
||||||
# extremely unclear and needs to be refactored.
|
# extremely unclear and needs to be refactored.
|
||||||
self.__metadata = Metadata.airtime_dict(full_mutagen)
|
self.__metadata = Metadata.airtime_dict(full_mutagen)
|
||||||
|
|
Loading…
Reference in New Issue