Styling tweaks.

Don't log error everytime OSX Notify agent cannot be found.
Add check in PlexWatch importer to skip over rows with bad xml.
Move some logging out of places where they would never be executed.
This commit is contained in:
Tim 2015-07-27 20:42:40 +02:00
parent eb2b530718
commit abc90e1252
5 changed files with 36 additions and 23 deletions

View file

@ -285,6 +285,11 @@ def import_from_plexwatch(database=None, table_name=None, import_ignore_interval
# Extract the xml from the Plexwatch db xml field.
extracted_xml = extract_plexwatch_xml(row['xml'])
# If we get back None from our xml extractor skip over the record and log error.
if not extracted_xml:
logger.error(u"PlexPy Importer :: Skipping line due to malformed xml.")
continue
# If the user_id no longer exists in the friends list, pull it from the xml.
if data_factory.get_user_id(user=row['user']):
user_id = data_factory.get_user_id(user=row['user'])