Ignore empty lines in history.
This commit is contained in:
parent
777e3f58e1
commit
1aaa538b45
@ -77,7 +77,11 @@ class WebHistory(QWebHistoryInterface):
|
|||||||
self._old_urls = set()
|
self._old_urls = set()
|
||||||
with self._lineparser.open():
|
with self._lineparser.open():
|
||||||
for line in self._lineparser:
|
for line in self._lineparser:
|
||||||
_time, url = line.rstrip().split(maxsplit=1)
|
data = line.strip().split(maxsplit=1)
|
||||||
|
if not data:
|
||||||
|
# empty line
|
||||||
|
continue
|
||||||
|
_time, url = data
|
||||||
self._old_urls.add(url)
|
self._old_urls.add(url)
|
||||||
self._new_history = []
|
self._new_history = []
|
||||||
self._saved_count = 0
|
self._saved_count = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user