From 2862587c152bb02c8671409eae0a5f307c279228 Mon Sep 17 00:00:00 2001 From: krzotr Date: Thu, 27 Feb 2020 00:48:26 +0100 Subject: [PATCH] Fixed "LookupError: 'hex' is not a text encoding" on /StatsBootstrapper page (#2442) * Fixed "LookupError: 'hex' is not a text encoding" * Fixed KeyError: 'ip4' --- plugins/disabled-Bootstrapper/BootstrapperPlugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/disabled-Bootstrapper/BootstrapperPlugin.py b/plugins/disabled-Bootstrapper/BootstrapperPlugin.py index 474f79c1..59e7af7b 100644 --- a/plugins/disabled-Bootstrapper/BootstrapperPlugin.py +++ b/plugins/disabled-Bootstrapper/BootstrapperPlugin.py @@ -150,7 +150,7 @@ class UiRequestPlugin(object): ).fetchall() yield "
%s (added: %s, peers: %s)
" % ( - str(hash_row["hash"]).encode("hex"), hash_row["date_added"], len(peer_rows) + str(hash_row["hash"]).encode().hex(), hash_row["date_added"], len(peer_rows) ) for peer_row in peer_rows: - yield " - {ip4: <30} {onion: <30} added: {date_added}, announced: {date_announced}
".format(**dict(peer_row)) + yield " - {type} {address}:{port} added: {date_added}, announced: {date_announced}
".format(**dict(peer_row))