do not crash if there is no operation
This commit is contained in:
parent
b108bf8a58
commit
fd597ea637
1 changed files with 5 additions and 1 deletions
|
|
@ -61,7 +61,11 @@ class TitreHistory(BasePage):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def iter_history(self):
|
def iter_history(self):
|
||||||
table = self.document.xpath('//table[@class="datas retour"]')[0]
|
try:
|
||||||
|
table = self.document.xpath('//table[@class="datas retour"]')[0]
|
||||||
|
except IndexError:
|
||||||
|
return # noop
|
||||||
|
|
||||||
trs = table.xpath('tr')
|
trs = table.xpath('tr')
|
||||||
trs.pop(0)
|
trs.pop(0)
|
||||||
trs.pop(-1)
|
trs.pop(-1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue