Skip to content

Commit

Permalink
use getint from configparser
Browse files Browse the repository at this point in the history
  • Loading branch information
ghecko committed Oct 16, 2020
1 parent 510617d commit b0e82ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions octowire_framework/module/AModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b0e82ec

Please sign in to comment.