configparser wants strings for ints...

workspace
Brendan Howell 5 years ago
parent dc915ab403
commit 8812123baf

@ -189,8 +189,8 @@ class Bureau(object):
self.smprint["prodid"] = printcfg["smallprinter"]["productid"] self.smprint["prodid"] = printcfg["smallprinter"]["productid"]
self.smprint["in_ep"] = printcfg["smallprinter"]["inep"] self.smprint["in_ep"] = printcfg["smallprinter"]["inep"]
self.smprint["out_ep"] = printcfg["smallprinter"]["outep"] self.smprint["out_ep"] = printcfg["smallprinter"]["outep"]
self.smprint["width"] = printcfg["smallprinter"]["width"] self.smprint["width"] = int(printcfg["smallprinter"]["width"])
self.smprint["textwidth"] = printcfg["smallprinter"]["textwidth"] self.smprint["textwidth"] = int(printcfg["smallprinter"]["textwidth"])
self.lp["name"] = printcfg["largeprinter"]["name"] self.lp["name"] = printcfg["largeprinter"]["name"]
self.lp["papersize"] = printcfg["largeprinter"]["papersize"] self.lp["papersize"] = printcfg["largeprinter"]["papersize"]
@ -198,8 +198,8 @@ class Bureau(object):
except KeyError: except KeyError:
# TODO: eventually refactor this since it could overwrite a half-broken config # TODO: eventually refactor this since it could overwrite a half-broken config
sp_dict = {"vendorid": None, "productid": None, sp_dict = {"vendorid": None, "productid": None,
"inep": None, "outep": None, "width": 384, "inep": None, "outep": None, "width": "384",
"textwidth": 32} "textwidth": "32"}
lp_dict = {"name": None, "papersize": "A4", lp_dict = {"name": None, "papersize": "A4",
"duplex": False} "duplex": False}
printcfg["smallprinter"] = sp_dict printcfg["smallprinter"] = sp_dict

Loading…
Cancel
Save