Refactor code
This commit is contained in:
parent
3b0fb84c47
commit
babbd0771c
@ -1122,13 +1122,13 @@ class CommandDispatcher:
|
||||
raise cmdexc.CommandError('Title must be provided if url has '
|
||||
'been provided')
|
||||
bookmark_manager = objreg.get('bookmark-manager')
|
||||
if isinstance(url, str):
|
||||
if url is None:
|
||||
url = self._current_url()
|
||||
else:
|
||||
try:
|
||||
url = urlutils.fuzzy_url(url)
|
||||
except urlutils.InvalidUrlError as e:
|
||||
raise cmdexc.CommandError(e)
|
||||
elif not url:
|
||||
url = self._current_url()
|
||||
if not title:
|
||||
title = self._current_title()
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user