summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-05-28 20:12:06 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-05-28 20:12:06 +0200
commit518ca24f1dae784a23ab7541a506fde42db01a3b (patch)
tree6568998fac22de05de5ddbcdc8ddec4f04a16f2b /modules
parenta1ecaccc2061a5d60a4b9c5ec83dcdee3c487097 (diff)
tracking: Don't fail when receiving a valid response with an empty EventSet.
Diffstat (limited to 'modules')
-rw-r--r--modules/tracking.py2
1 files changed, 2 insertions, 0 deletions
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('&lt;', '<')
desc = re.sub(r'<[^>]*?>', '', desc).encode('utf8')