From 518ca24f1dae784a23ab7541a506fde42db01a3b Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 28 May 2010 20:12:06 +0200 Subject: tracking: Don't fail when receiving a valid response with an empty EventSet. --- modules/tracking.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules') diff --git a/modules/tracking.py b/modules/tracking.py index aa33980..82c8db0 100644 --- a/modules/tracking.py +++ b/modules/tracking.py @@ -102,6 +102,8 @@ class Module: for package in packages: code = package.attrib['packageId'] eventset = package.find('{%s}EventSet' % ns) + if not len(eventset): + continue last = eventset[0] desc = last.find('{%s}Description' % ns).text.replace('<', '<') desc = re.sub(r'<[^>]*?>', '', desc).encode('utf8') -- cgit v1.2.3