Fix loading of quickmarks with fuzzy URLs

This commit is contained in:
Florian Bruhin 2014-10-07 07:04:49 +02:00
parent 881e45d9eb
commit f0990aec32
2 changed files with 4 additions and 4 deletions

View File

@ -770,8 +770,7 @@ class CommandDispatcher:
bg: Load the quickmark in a new background tab.
window: Load the quickmark in a new window.
"""
urlstr = quickmarks.get(name)
url = QUrl(urlstr)
url = quickmarks.get(name)
self._open(url, tab, bg, window)
@cmdutils.register(instance='command-dispatcher', name='inspector',

View File

@ -108,8 +108,9 @@ def get(name):
raise cmdexc.CommandError(
"Quickmark '{}' does not exist!".format(name))
urlstr = marks[name]
url = QUrl(urlstr)
if not url.isValid():
try:
url = urlutils.fuzzy_url(urlstr)
except urlutils.FuzzyUrlError:
raise cmdexc.CommandError(
"Invalid URL for quickmark {}: {} ({})".format(name, urlstr,
url.errorString()))