Fixed exception handling in select_follow command.
This commit is contained in:
parent
4ff9d585ea
commit
c5c145320c
@ -1006,12 +1006,13 @@ class CommandDispatcher:
|
||||
try:
|
||||
selected_element = xml.etree.ElementTree.fromstring(
|
||||
'<html>' + widget.selectedHtml() + '</html>').find('a')
|
||||
if selected_element is not None:
|
||||
url = selected_element.attrib['href']
|
||||
if url:
|
||||
self._open(QUrl(url), tab)
|
||||
except xml.etree.ElementTree.ParseError:
|
||||
pass
|
||||
raise cmdexc.CommandError('Parse error')
|
||||
|
||||
if selected_element is not None:
|
||||
url = selected_element.attrib['href']
|
||||
if url:
|
||||
self._open(QUrl(url), tab)
|
||||
|
||||
@cmdutils.register(instance='command-dispatcher', name='inspector',
|
||||
scope='window')
|
||||
|
Loading…
Reference in New Issue
Block a user