do not crash when contacts list is empty
This commit is contained in:
parent
c15bca8743
commit
487284fe5c
1 changed files with 5 additions and 1 deletions
|
|
@ -134,7 +134,11 @@ class ContactListPage(PageBase):
|
||||||
def on_loaded(self):
|
def on_loaded(self):
|
||||||
self.items = []
|
self.items = []
|
||||||
|
|
||||||
tags = self.document.getElementsByTagName('form')[0].childNodes[3].childNodes[1].childNodes
|
form = self.document.getElementsByTagName('form')
|
||||||
|
if not form:
|
||||||
|
return
|
||||||
|
|
||||||
|
tags = form[0].childNodes[3].childNodes[1].childNodes
|
||||||
|
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
if not hasattr(tag, 'tagName') or tag.tagName != u'tr':
|
if not hasattr(tag, 'tagName') or tag.tagName != u'tr':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue