Removed useless checks.
This commit is contained in:
parent
5e8129788a
commit
1e354a797e
@ -31,7 +31,7 @@ import collections
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal, QUrl, QObject
|
||||
|
||||
from qutebrowser.utils import message, urlutils, standarddir, objreg
|
||||
from qutebrowser.utils import message, standarddir, objreg
|
||||
from qutebrowser.misc import lineparser
|
||||
|
||||
|
||||
@ -102,20 +102,8 @@ class BookmarkManager(QObject):
|
||||
url: The url to add as bookmark.
|
||||
title: The title for the new bookmark.
|
||||
"""
|
||||
if not url.isValid():
|
||||
urlutils.invalid_url_error(win_id, url, "save quickmark")
|
||||
return
|
||||
urlstr = url.toString(QUrl.RemovePassword | QUrl.FullyEncoded)
|
||||
|
||||
# We don't raise cmdexc.CommandError here as this can be called async
|
||||
# via prompt_save.
|
||||
if not title:
|
||||
message.error(win_id, "Can't set mark with empty title!")
|
||||
return
|
||||
if not urlstr:
|
||||
message.error(win_id, "Can't set mark with empty URL!")
|
||||
return
|
||||
|
||||
if urlstr in self.bookmarks:
|
||||
message.error(win_id, "Bookmark already exists!")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user