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

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

diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py
index 8b345b5a..6ea597de 100644
--- a/ohmpi/hardware_components/raspberry_pi.py
+++ b/ohmpi/hardware_components/raspberry_pi.py
@@ -44,7 +44,6 @@ class Ctl(CtlAbstract):
         except RuntimeWarning:
             pass
 
-        warnings.resetwarnings()
         # Extended I2C
         try:
             self.interfaces['i2c_ext'] = ExtendedI2C(4)  # 4 is defined
@@ -52,8 +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
         try:
-- 
GitLab