Don't log xml for playlists

This commit is contained in:
tomkat83 2017-03-26 12:51:16 +02:00
parent 9975a2a587
commit 944246b716

View file

@ -164,17 +164,6 @@ def playlist_item_from_xml(playlist, xml_video_element):
return item
def _log_xml(xml):
try:
xml.attrib
except AttributeError:
log.error('Did not receive an XML. Answer was: %s' % xml)
else:
from xml.etree.ElementTree import dump
log.error('XML received from the PMS:')
dump(xml)
def _get_playListVersion_from_xml(playlist, xml):
"""
Takes a PMS xml as input to overwrite the playlist version (e.g. Plex
@ -185,7 +174,6 @@ def _get_playListVersion_from_xml(playlist, xml):
except (TypeError, AttributeError, KeyError):
log.error('Could not get new playlist Version for playlist %s'
% playlist)
_log_xml(xml)
return False
return True
@ -208,7 +196,6 @@ def get_playlist_details_from_xml(playlist, xml):
% playlist)
import traceback
log.error(traceback.format_exc())
_log_xml(xml)
raise KeyError
log.debug('Updated playlist from xml: %s' % playlist)
@ -341,7 +328,6 @@ def add_item_to_PMS_playlist(playlist, pos, plex_id=None, kodi_item=None):
except (TypeError, AttributeError, KeyError):
log.error('Could not add item %s to playlist %s'
% (kodi_item, playlist))
_log_xml(xml)
return
# Get the guid for this item
for plex_item in xml: