cc-4397: Fixed handling for bad metadata.
This commit is contained in:
parent
e708f60f68
commit
8e91c515f0
3 changed files with 12 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
from kombu.messaging import Exchange, Queue, Consumer
|
||||
from kombu.connection import BrokerConnection
|
||||
from os.path import normpath
|
||||
from mutagen.easymp4 import EasyMP4KeyError
|
||||
|
||||
import json
|
||||
import os
|
||||
|
@ -117,6 +118,10 @@ class AirtimeMessageReceiver(Loggable):
|
|||
try: Metadata.write_unsafe(path=md_path, md=msg)
|
||||
except BadSongFile as e:
|
||||
self.logger.info("Cannot find metadata file: '%s'" % e.path)
|
||||
except EasyMP4KeyError as e:
|
||||
self.logger.info("Metadata instance not supported for this file '%s'" \
|
||||
% e.path)
|
||||
self.logger.info(str(e))
|
||||
except Exception as e:
|
||||
# TODO : add md_path to problem path or something?
|
||||
self.fatal_exception("Unknown error when writing metadata to: '%s'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue