Ignore invalid history entries on start.
This commit is contained in:
parent
8d98868ccd
commit
e294e325f0
@ -25,7 +25,7 @@ import collections
|
||||
from PyQt5.QtCore import pyqtSignal, QUrl
|
||||
from PyQt5.QtWebKit import QWebHistoryInterface
|
||||
|
||||
from qutebrowser.utils import utils, objreg, standarddir
|
||||
from qutebrowser.utils import utils, objreg, standarddir, log
|
||||
from qutebrowser.config import config
|
||||
from qutebrowser.misc import lineparser
|
||||
|
||||
@ -89,6 +89,11 @@ class WebHistory(QWebHistoryInterface):
|
||||
if not data:
|
||||
# empty line
|
||||
continue
|
||||
elif len(data) != 2:
|
||||
# other malformed line
|
||||
log.init.warning("Invalid history entry {!r}!".format(
|
||||
line))
|
||||
continue
|
||||
atime, url = data
|
||||
# This de-duplicates history entries; only the latest
|
||||
# entry for each URL is kept. If you want to keep
|
||||
|
Loading…
Reference in New Issue
Block a user