diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py index 53893a975edf2788c6497b60c5d2439066c0539e..d3333c085c675b8db59c1a02d9b1171e0766a39c 100644 --- a/ohmpi/hardware_components/raspberry_pi.py +++ b/ohmpi/hardware_components/raspberry_pi.py @@ -43,7 +43,6 @@ class Ctl(CtlAbstract): self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa except RuntimeWarning: pass - warnings.resetwarnings() # Extended I2C try: @@ -53,6 +52,8 @@ class Ctl(CtlAbstract): except Exception as e: self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}') + warnings.resetwarnings() + # modbus try: self.interfaces['modbus'] = minimalmodbus.Instrument(port=kwargs['modbus_port'],