From 1e354a797e8edf5530e1880925997617a00db1ac Mon Sep 17 00:00:00 2001 From: Antoni Boucher Date: Sat, 11 Jul 2015 19:52:48 -0400 Subject: [PATCH] Removed useless checks. --- qutebrowser/browser/bookmarks.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/qutebrowser/browser/bookmarks.py b/qutebrowser/browser/bookmarks.py index 2c1558f84..c57d0c23e 100644 --- a/qutebrowser/browser/bookmarks.py +++ b/qutebrowser/browser/bookmarks.py @@ -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: