summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Wagner <rwagner@mythtv.org>2010-11-12 19:08:57 (GMT)
committer Raymond Wagner <rwagner@mythtv.org>2010-11-12 19:08:57 (GMT)
commit21af898e841035e550ac8105e7861c8679230011 (patch)
treec4db022e98d4be462289a5fbf7ff0ca1b9399ce7
parentf2aa4c3566b7e8f8e03c8d232b12bbf66eec790d (diff)
Fix handling of responses to queries from metadata grabbers when provided with no output, rather than the expected of output with no results.
git-svn-id: http://svn.mythtv.org/svn/trunk@27203 7dbf422c-18fa-0310-86e9-fd20926502f2
-rw-r--r--mythtv/bindings/python/MythTV/system.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/mythtv/bindings/python/MythTV/system.py b/mythtv/bindings/python/MythTV/system.py
index 9838d4f..5b118a7 100644
--- a/mythtv/bindings/python/MythTV/system.py
+++ b/mythtv/bindings/python/MythTV/system.py
@@ -212,7 +212,12 @@ class InternetMetadata( Metadata ):
class Grabber( System ):
def _processMetadata(self, xml):
- for item in etree.fromstring(xml).getiterator('item'):
+ try:
+ xml = etree.fromstring(xml)
+ except:
+ raise StopIteration
+
+ for item in xml.getiterator('item'):
yield self.cls(item)
def command(self, *args):