From 23e13e94a1191007504d9211013e3a6453d174c5 Mon Sep 17 00:00:00 2001 From: Desuuuu Date: Sun, 28 Aug 2022 18:29:29 +0200 Subject: [PATCH] t5uid1: fix Python3 errors --- klippy/extras/t5uid1/var.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/klippy/extras/t5uid1/var.py b/klippy/extras/t5uid1/var.py index 2e105935..66b792ed 100644 --- a/klippy/extras/t5uid1/var.py +++ b/klippy/extras/t5uid1/var.py @@ -47,7 +47,7 @@ class T5UID1_Var: raise config.error("Invalid address '%s' in section '%s'" % (address, config.get_name())) - data_types = TYPES_LEN.keys() + data_types = list(TYPES_LEN.keys()) data_types.append('str') if self.type == "input": data_types.append('none') @@ -122,7 +122,7 @@ class T5UID1_Var: result = self._template.render(context) if self.data_type == "str": - result = bytearray(result.replace('\n', '')) + result = bytearray(result.replace('\n', ''), "ascii") target_len = self.data_len if target_len % 2 != 0: target_len += 1