Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

treat retrieval of an incompatible message from history as a "message… #4305

Merged
merged 4 commits into from
Jun 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion golem/network/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,13 @@ def get_sync_as_message(cls, *args, **kwargs) -> message.base.Message:
if not db_result:
raise MessageNotFound()
db_msg = db_result[0]
return db_msg.as_message()
try:
return db_msg.as_message()
except AttributeError:
# in case an incompatible message from an earlier version of
# golem-messages is retrieved, just treat it the same
# as if the message was not found
raise MessageNotFound()

def add(self, msg_dict: dict) -> None:
"""
Expand Down