diff --git a/ohmpi/hardware_components/raspberry_pi.py b/ohmpi/hardware_components/raspberry_pi.py index 86a96d64a06dd835baa4a64adf0e1d535660c628..1d2b0eedb6d30b732a42e7b9f7e63d99a6b74a06 100644 --- a/ohmpi/hardware_components/raspberry_pi.py +++ b/ohmpi/hardware_components/raspberry_pi.py @@ -37,9 +37,7 @@ class Ctl(CtlAbstract): # None interface for battery self.interfaces['none'] = None - # warnings.filterwarnings("error") # to filter out adafruit warning about setting I2C frequency # I2C - warnings.filterwarnings(RuntimeWarning, action='ignore', module=busio) try: self.interfaces['i2c'] = busio.I2C(board.SCL, board.SDA) # noqa except Exception as e: @@ -47,7 +45,7 @@ class Ctl(CtlAbstract): # warnings.resetwarnings() # Extended I2C - warnings.filterwarnings(RuntimeWarning, action='ignore', module=ExtendedI2C) + warnings.filterwarnings(action='ignore', category=RuntimeWarning, module='adafruit_blinka') # to filter out adafruit warning about setting I2C frequency try: self.interfaces['i2c_ext'] = ExtendedI2C(4) # 4 is defined except Exception as e: