Commit 7cb50745 authored by Tijmen de Mes's avatar Tijmen de Mes

Skip traceback if history file/dir does not exist

parent 87a4c7e3
......@@ -86,6 +86,8 @@ class HistoryManager(object, metaclass=Singleton):
data = pickle.load(open(ApplicationData.get('calls_history'), "rb"))
if not isinstance(data, list) or not all(isinstance(item, HistoryEntry) and item.text and isinstance(item.call_time, ISOTimestamp) for item in data):
raise ValueError("invalid save data")
except FileNotFoundError:
pass
except Exception as e:
traceback.print_exc()
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment