From a88a0d0befa7cd26f26599068bd1d4ad23f8d02d Mon Sep 17 00:00:00 2001 From: su530201 <olivier.kaufmann@umons.ac.be> Date: Wed, 18 Oct 2023 23:27:26 +0200 Subject: [PATCH] Fixes warning in raspberry --- ohmpi/hardware_components/raspberry_pi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py index 4702fc96..93acf8fc 100644 --- a/ohmpi/hardware_components/raspberry_pi.py +++ b/ohmpi/hardware_components/raspberry_pi.py @@ -43,6 +43,7 @@ class Ctl(CtlAbstract): self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa except RuntimeWarning: pass + warnings.resetwarnings() # Extended I2C try: @@ -51,7 +52,6 @@ class Ctl(CtlAbstract): pass except Exception as e: self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}') - warnings.resetwarnings() # modbus try: -- GitLab