From 929ab656f17d36bbdd65fc6876742823bc4e08e8 Mon Sep 17 00:00:00 2001
From: su530201 <olivier.kaufmann@umons.ac.be>
Date: Sun, 30 Apr 2023 21:26:55 +0200
Subject: [PATCH] Fixes deprecation

---
 ohmpi.py | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/ohmpi.py b/ohmpi.py
index 308d0ce2..7ed12892 100644
--- a/ohmpi.py
+++ b/ohmpi.py
@@ -22,7 +22,6 @@ from termcolor import colored
 import threading
 from OhmPi.logging_setup import setup_loggers
 from OhmPi.config import MQTT_CONTROL_CONFIG, OHMPI_CONFIG, EXEC_LOGGING_CONFIG
-import OhmPi.deprecated as deprecated
 from logging import DEBUG
 from OhmPi.hardware_system import OhmPiHardware
 
@@ -153,11 +152,7 @@ class OhmPi(object):
                 self.exec_logger.warning('No connection to control broker.'
                                          ' Use python/ipython to interact with OhmPi object...')
 
-    def __getattr__(self, name):
-        if hasattr(deprecated, name):
-            return getattr(deprecated, name)
-        else:
-            return self.name
+    from OhmPi.deprecated import *
 
     @staticmethod
     def append_and_save(filename: str, last_measurement: dict, cmd_id=None):
-- 
GitLab