catch the right exception
This commit is contained in:
parent
fe8374e671
commit
d0b546cc15
1 changed files with 1 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ class UnavailablePage(BasePage):
|
|||
def on_loaded(self):
|
||||
try:
|
||||
a = self.document.xpath('//a[@class="btn"]')[0]
|
||||
except KeyError:
|
||||
except IndexError:
|
||||
raise BrowserUnavailable()
|
||||
else:
|
||||
self.browser.location(a.attrib['href'])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue