Skip to content

Commit

Permalink
coap/fauxhoc: Remove old workarounds, prettify errors
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed May 17, 2024
1 parent b0df375 commit 1cd5e43
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions examples/coap/fauxhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

if args.peer.count("/") != 2:
p.error(
"Peer should be given as 'coap://[2001:db8:;1]' or similar, without trailing slash."
"Peer should be given as 'coap://[2001:db8::1]' or similar, without trailing slash."
)

# Someone told us that these are the credentials of devices that are our legitimate peers
Expand Down Expand Up @@ -162,10 +162,6 @@ async def main():
msg2 = await ctx.request(msg1).response_raising

(c_r, id_cred_r, ead_2) = initiator.parse_message_2(msg2.payload)
# https://github.com/openwsn-berkeley/lakers/issues/256 -- conveniently,
# after it is fixed, the line becomes a no-op, so this can stay in until a
# Lakers release to PyPI happened.
id_cred_r = bytes(id_cred_r)

print(f"Received MSG2 with {c_r=} {id_cred_r=} {ead_2=}")

Expand Down Expand Up @@ -208,4 +204,4 @@ async def main():


if __name__ == "__main__":
asyncio.run(main())
asyncio.run(coap_console.aiocoap_errors_are_pretty(main()))

0 comments on commit 1cd5e43

Please sign in to comment.