From 1d45b993357f9b2dbeb4a3d14c06789bf22e67ef Mon Sep 17 00:00:00 2001 From: Joshua May Date: Fri, 13 Sep 2019 18:37:17 -0700 Subject: [PATCH] bytes don't encode as hex with Python 3, with just .hex() 'em --- sirius/fake/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sirius/fake/commands.py b/sirius/fake/commands.py index 50749b2..908b470 100644 --- a/sirius/fake/commands.py +++ b/sirius/fake/commands.py @@ -22,9 +22,9 @@ fake_manager = script.Manager(sub_opts, usage="Fake printer interactions.") @fake_manager.command def printer(): - device_address = os.urandom(8).encode('hex') + device_address = os.urandom(8).hex() xor = bitshuffle.hardware_xor_from_device_address(device_address) - secret = os.urandom(5).encode('hex') + secret = os.urandom(5).hex() cc = claiming.encode(xor, int(secret, 16)) printer = hardware.Printer( -- 2.47.3