diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-28 20:12:06 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-05-28 20:12:06 +0200 |
commit | 518ca24f1dae784a23ab7541a506fde42db01a3b (patch) | |
tree | 6568998fac22de05de5ddbcdc8ddec4f04a16f2b | |
parent | a1ecaccc2061a5d60a4b9c5ec83dcdee3c487097 (diff) |
tracking: Don't fail when receiving a valid response with an empty EventSet.
-rw-r--r-- | modules/tracking.py | 2 |
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('<', '<') desc = re.sub(r'<[^>]*?>', '', desc).encode('utf8') |