Skip to content

Commit

Permalink
fix to support using shared instance from older rns version
Browse files Browse the repository at this point in the history
  • Loading branch information
liamcottle committed Sep 25, 2024
1 parent 417c9be commit 4ef5f9a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions meshchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,12 +1111,14 @@ async def index(request):
interface_stats["transport_id"] = interface_stats["transport_id"].hex()

# ensure probe_responder is hex as json_response can't serialize bytes
if "probe_responder" in interface_stats:
if "probe_responder" in interface_stats and interface_stats["probe_responder"] is not None:
interface_stats["probe_responder"] = interface_stats["probe_responder"].hex()

# ensure ifac_signature is hex as json_response can't serialize bytes
for interface in interface_stats["interfaces"]:
interface["interface_name"] = interface["short_name"]

if "short_name" in interface:
interface["interface_name"] = interface["short_name"]

if "parent_interface_name" in interface and interface["parent_interface_name"] != None:
interface["parent_interface_hash"] = interface["parent_interface_hash"].hex()
Expand Down

0 comments on commit 4ef5f9a

Please sign in to comment.