From 8812123baffeac6a376f0a3f46328ba5b4504b31 Mon Sep 17 00:00:00 2001 From: Brendan Howell Date: Fri, 20 Mar 2020 00:23:51 +0100 Subject: [PATCH] configparser wants strings for ints... --- screenless/bureau/bureau.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/screenless/bureau/bureau.py b/screenless/bureau/bureau.py index 9eee76e..f777737 100644 --- a/screenless/bureau/bureau.py +++ b/screenless/bureau/bureau.py @@ -189,8 +189,8 @@ class Bureau(object): self.smprint["prodid"] = printcfg["smallprinter"]["productid"] self.smprint["in_ep"] = printcfg["smallprinter"]["inep"] self.smprint["out_ep"] = printcfg["smallprinter"]["outep"] - self.smprint["width"] = printcfg["smallprinter"]["width"] - self.smprint["textwidth"] = printcfg["smallprinter"]["textwidth"] + self.smprint["width"] = int(printcfg["smallprinter"]["width"]) + self.smprint["textwidth"] = int(printcfg["smallprinter"]["textwidth"]) self.lp["name"] = printcfg["largeprinter"]["name"] self.lp["papersize"] = printcfg["largeprinter"]["papersize"] @@ -198,8 +198,8 @@ class Bureau(object): except KeyError: # TODO: eventually refactor this since it could overwrite a half-broken config sp_dict = {"vendorid": None, "productid": None, - "inep": None, "outep": None, "width": 384, - "textwidth": 32} + "inep": None, "outep": None, "width": "384", + "textwidth": "32"} lp_dict = {"name": None, "papersize": "A4", "duplex": False} printcfg["smallprinter"] = sp_dict