diff --git a/src/dynamic-srv.py b/src/dynamic-srv.py index cb4cff0eda6a50db55cde686ab5adc7419d2f228..c94b10eff16d23b575b76c88122b4f01c21f6ebe 100755 --- a/src/dynamic-srv.py +++ b/src/dynamic-srv.py @@ -220,24 +220,6 @@ class Dynamic(PyTango.Device_4Impl): self.write_functions = CaseLessDict() #link to the Tango DB self.db = PyTango.Database() - - if self.FiltersScript: - aux = self.FiltersScript.split('/') - path = '/'.join(aux[:-1]) - if path: - if path not in sys.path: - sys.path.insert(0, path) - module_name = aux[-1].replace('.py','') - try: - self.module = __import__(module_name) - except ImportError as ex: - #sys.stderr.write(str(ex)+"\n") - self.module = None - self.set_state(PyTango.DevState.FAULT) - self.set_status("Invalid Filters Script " + self.FiltersScript ) - return - else: - self.module = None # import the configuration script as a module if self.ConfiguratorScript: @@ -568,7 +550,7 @@ class Dynamic(PyTango.Device_4Impl): #------------------------------------------------------------------ def read_dynamic_attribute(self, attr_name): if self.read_functions[attr_name]: - read_method = getattr(self.module,self.read_functions[attr_name]) + read_method = getattr(self.cfg_module,self.read_functions[attr_name]) num_of_args = read_method.__code__.co_argcount if num_of_args == 1: # If method allows an input parameter, @@ -586,7 +568,7 @@ class Dynamic(PyTango.Device_4Impl): #------------------------------------------------------------------ def write_dynamic_attribute(self, attr_name, value_in): if self.write_functions[attr_name]: - write_method = getattr(self.module,self.write_functions[attr_name]) + write_method = getattr(self.cfg_module,self.write_functions[attr_name]) num_of_args = write_method.__code__.co_argcount if num_of_args == 2: # If method allows two input parameter, @@ -622,10 +604,6 @@ class DynamicClass(PyTango.DeviceClass): [PyTango.DevString, "Path to the config file", [] ], - 'FiltersScript': - [PyTango.DevString, - "Path to the python script that will be executed.", - [] ], 'DefaultCfgScript': [PyTango.DevString, "Path to the default config file",