Commit 1c2c49e7 authored by Olivier Kaufmann's avatar Olivier Kaufmann
Browse files

Tries to fix adafruit warning

Showing with 2 additions and 1 deletion
+2 -1
...@@ -43,7 +43,6 @@ class Ctl(CtlAbstract): ...@@ -43,7 +43,6 @@ class Ctl(CtlAbstract):
self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa
except RuntimeWarning: except RuntimeWarning:
pass pass
warnings.resetwarnings()
# Extended I2C # Extended I2C
try: try:
...@@ -53,6 +52,8 @@ class Ctl(CtlAbstract): ...@@ -53,6 +52,8 @@ class Ctl(CtlAbstract):
except Exception as e: except Exception as e:
self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}') self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}')
warnings.resetwarnings()
# modbus # modbus
try: try:
self.interfaces['modbus'] = minimalmodbus.Instrument(port=kwargs['modbus_port'], self.interfaces['modbus'] = minimalmodbus.Instrument(port=kwargs['modbus_port'],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment