Skip to content

Commit

Permalink
Fix version parsing when returned value is UNKNOWN (#522)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandemeusy authored May 27, 2024
1 parent 87077f3 commit 2bf83ff
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ct-app/core/model/peer.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ def version(self) -> Version:

@version.setter
def version(self, value: str or Version):
if isinstance(value, str):
value = Version(value)
if not isinstance(value, Version):
try:
value = Version(value)
except Exception:
value = Version("0.0.0")

self._version = value

Expand Down

0 comments on commit 2bf83ff

Please sign in to comment.