Browse files

Allow bad Metadata tags to be bypassed

This is in response to a change in the TMDb API that resulted in the
grabber returning bad data for the 'lastupdated' field.  If a field
returns bad data, skip over it and continue processing the rest of the
result.
  • Loading branch information...
1 parent 5f926ea commit 15b0ffc383b87173708ccd867e0f0fdddceec4da @wagnerrp wagnerrp committed Oct 30, 2011
Showing with 12 additions and 10 deletions.
  1. +12 −10 mythtv/bindings/python/MythTV/system.py
View
22 mythtv/bindings/python/MythTV/system.py
@@ -222,16 +222,18 @@ def _fillNone(self):
def _process(self, xml):
for element in xml.getchildren():
- if element.tag in self:
- if (element.text == '') or (element.text is None):
- self[element.tag] = None
- else:
- self[element.tag] = \
- self._trans[self._global_type[element.tag]]\
- (element.text)
- if element.tag in self._groups:
- self.__dict__[element.tag] = \
- getattr(self, element.tag.capitalize())(element)
+ try:
+ if element.tag in self:
+ if (element.text == '') or (element.text is None):
+ self[element.tag] = None
+ else:
+ self[element.tag] = \
+ self._trans[self._global_type[element.tag]]\
+ (element.text)
+ elif element.tag in self._groups:
+ self.__dict__[element.tag] = \
+ getattr(self, element.tag.capitalize())(element)
+ except: pass
def toXML(self):
eroot = etree.Element('item')

0 comments on commit 15b0ffc

Please sign in to comment.