Fix loading of history with URLs containing spaces

Fixes #508.
This commit is contained in:
Florian Bruhin 2015-02-13 18:58:44 +01:00
parent 1c5f036d4e
commit e459e1a472

View File

@ -53,10 +53,7 @@ class HistoryEntry:
@classmethod @classmethod
def from_str(cls, s): def from_str(cls, s):
"""Get a history based on a 'TIME URL' string.""" """Get a history based on a 'TIME URL' string."""
splitted = s.split(' ') return cls(*s.split(' ', maxsplit=1))
if len(splitted) != 2:
raise OSError("Invalid history entry '{}'".format(s))
return cls(*splitted)
class WebHistory(QWebHistoryInterface): class WebHistory(QWebHistoryInterface):