Commit d6db7c8a authored by Jibril Mammeri's avatar Jibril Mammeri
Browse files

Protect positioner property

parent ca895bf4
Pipeline #39085 passed with stages
in 99 minutes and 4 seconds
......@@ -354,7 +354,7 @@ class MapWithAliases(Map):
def get_axes_names_iter(self):
for axis in self.get_axes_iter():
if axis.positioner:
if axis._positioner:
yield axis.name
def get_axes_positions_iter(self, on_error=None):
......@@ -373,7 +373,7 @@ class MapWithAliases(Map):
tasks = list()
for axis in self.get_axes_iter():
if axis.positioner:
if axis._positioner:
tasks.append(gevent.spawn(request, axis))
gevent.joinall(tasks)
......
......@@ -741,12 +741,12 @@ class Axis:
return self.__name
@property
def positioner(self):
def _positioner(self):
"""Axis positioner"""
return self.__positioner
@positioner.setter
def positioner(self, new_p):
@_positioner.setter
def _positioner(self, new_p):
self.__positioner = new_p
@autocomplete_property
......
......@@ -21,7 +21,6 @@ def SoftAxis(
tolerance=None,
export_to_session=True,
unit=None,
positioner=False,
):
# if callable(position):
......@@ -48,7 +47,7 @@ def SoftAxis(
controller._init()
axis = controller.get_axis(name)
axis.positioner = positioner
axis._positioner = False
if export_to_session:
current_session = get_current_session()
......
......@@ -100,5 +100,5 @@ def test_soft_axis_iter_position_all(session):
o = Object()
m0 = SoftAxis("bla", o)
assert not any(whereall.axis_name == "bla" for whereall in iter_axes_position_all())
m0.positioner = True
m0._positioner = True
assert any(whereall.axis_name == "bla" for whereall in iter_axes_position_all())
Supports Markdown
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