From b0e82eca2ff8dfef2ba868817f45743d2ef1e32d Mon Sep 17 00:00:00 2001 From: ghecko Date: Fri, 16 Oct 2020 15:25:15 +0200 Subject: [PATCH] use getint from configparser --- octowire_framework/module/AModule.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/octowire_framework/module/AModule.py b/octowire_framework/module/AModule.py index 53c74cb..c67484a 100644 --- a/octowire_framework/module/AModule.py +++ b/octowire_framework/module/AModule.py @@ -81,12 +81,12 @@ def connect(self): :return: Nothing """ if not isinstance(self.owf_serial, serial.Serial) or not self.owf_serial.is_open: - if self.config["OCTOWIRE"]["detect"]: + if self.config["OCTOWIRE"].getint("detect"): self.owf_serial = self._manage_connection() else: port = self.config["OCTOWIRE"]["port"] - baudrate = self.config["OCTOWIRE"]["baudrate"] - timeout = self.config["OCTOWIRE"]["read_timeout"] + baudrate = self.config["OCTOWIRE"].getint("baudrate") + timeout = self.config["OCTOWIRE"].getint("read_timeout") self.owf_serial = self._manage_connection(auto_connect=False, octowire_port=port, octowire_baudrate=baudrate, octowire_timeout=timeout)