Skip to content
Snippets Groups Projects
Commit ee65ceff authored by Martin Scarcia's avatar Martin Scarcia
Browse files

fix for python3

parent 448d87b5
No related branches found
No related tags found
No related merge requests found
......@@ -545,7 +545,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])
num_of_args = read_method.func_code.co_argcount
num_of_args = read_method.__code__.co_argcount
if num_of_args == 1:
# If method allows an input parameter,
# it's a reference to this class
......@@ -563,7 +563,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])
num_of_args = write_method.func_code.co_argcount
num_of_args = write_method.__code__.co_argcount
if num_of_args == 2:
# If method allows two input parameter,
# the first is a reference to this class
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment