From 4f9391f015a61b08f29c221ceaf5055703be2e7e Mon Sep 17 00:00:00 2001 From: K Date: Thu, 19 Jan 2023 09:32:45 +0100 Subject: [PATCH] Fix version detection Version check failed when the server sent something other than a number as a version as happened on development version of the gotosocial server. --- toot/tui/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toot/tui/app.py b/toot/tui/app.py index ffab49d..7429a73 100644 --- a/toot/tui/app.py +++ b/toot/tui/app.py @@ -336,7 +336,8 @@ class TUI(urwid.Frame): # this works for Mastodon and Pleroma version strings # Mastodon versions < 4 do not have translation service # Revisit this logic if Pleroma implements translation - self.can_translate = int(instance["version"][0]) > 3 + ch = instance["version"][0] + self.can_translate = int(ch) > 3 if ch.isnumeric() else False return self.run_in_thread(_load_instance, done_callback=_done)