From 6a61aae7dccc024a02d79ac454f57b737ef9835e Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Tue, 28 Nov 2023 16:56:00 +0100
Subject: [PATCH] Tries to fix adafruit warning

---
 ohmpi/hardware_components/raspberry_pi.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py
index f9a9d40b..3b070785 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:
@@ -52,7 +51,7 @@ class Ctl(CtlAbstract):
             pass
         except Exception as e:
             self.exec_logger.warning(f'Could not initialize Extended I2C:\n{e}')
-
+        warnings.resetwarnings()
 
 
         # modbus
-- 
GitLab