Skip to content

Commit

Permalink
Fixed "LookupError: 'hex' is not a text encoding" on /StatsBootstrapp…
Browse files Browse the repository at this point in the history
…er page (HelloZeroNet#2442)

* Fixed "LookupError: 'hex' is not a text encoding"

* Fixed  KeyError: 'ip4'
  • Loading branch information
krzotr authored Feb 26, 2020
1 parent 6218a92 commit 2862587
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/disabled-Bootstrapper/BootstrapperPlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def actionStatsBootstrapper(self):
).fetchall()

yield "<br>%s (added: %s, peers: %s)<br>" % (
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}<br>".format(**dict(peer_row))
yield " - {type} {address}:{port} added: {date_added}, announced: {date_announced}<br>".format(**dict(peer_row))

0 comments on commit 2862587

Please sign in to comment.