mxcubecore 1.372.0__py3-none-any.whl → 1.373.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,7 @@ from __future__ import absolute_import
23
23
  import ast
24
24
  import copy
25
25
  import enum
26
+ import itertools
26
27
  import logging
27
28
  import typing
28
29
  import warnings
@@ -520,14 +521,14 @@ class HardwareObjectNode:
520
521
  #
521
522
  # Look-up object by role the old way.
522
523
  #
523
- objects = [self]
524
524
 
525
- for curr in objects:
526
- result = curr._objects_by_role.get(role)
527
- if result is None:
528
- objects.extend(obj for obj in curr if obj)
529
-
530
- else:
525
+ #
526
+ # Look for object recursively, starting with our self
527
+ # and then checking the child objects.
528
+ #
529
+ for object in itertools.chain([self], *self.__objects):
530
+ result = object._objects_by_role.get(role)
531
+ if result is not None:
531
532
  return result
532
533
 
533
534
  def _objects_names(self) -> List[Union[str, None]]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mxcubecore
3
- Version: 1.372.0
3
+ Version: 1.373.0
4
4
  Summary: Core libraries for the MXCuBE application
5
5
  License: LGPL-3.0-or-later
6
6
  Keywords: mxcube,mxcube3,mxcubecore
@@ -1,4 +1,4 @@
1
- mxcubecore/BaseHardwareObjects.py,sha256=KuvnwMTXRZsozQcuMqhQVGdj-T6xSsaeoFu2NuprL18,41184
1
+ mxcubecore/BaseHardwareObjects.py,sha256=2kMsbOvqMsRv5qoHP_dOY6_eAC_roA_KP8o3BEN4b3w,41268
2
2
  mxcubecore/Command/Epics.py,sha256=9ftSEd4VdaFTE0qSrjL7LikLc_LJjz1-nNZF4J7hbWE,7748
3
3
  mxcubecore/Command/Exporter.py,sha256=HL6hncI_EUjjVX7frOsmxGa2Gyc-3PwUPXLUBJk4B20,8076
4
4
  mxcubecore/Command/Mockup.py,sha256=OrGAJC0JjTTjGSMZl7NiWJmVUQeEThMYdSQzuBD-bEc,1949
@@ -469,8 +469,8 @@ mxcubecore/utils/conversion.py,sha256=G1bk2Mi2ZwGbZa5pEeiFaKWxhSVXVGqu1L9_SioyUO
469
469
  mxcubecore/utils/qt_import.py,sha256=0lPmqok_oYQZ059kJCq7RWdg490T8YKyRvoZGyWDy4M,14486
470
470
  mxcubecore/utils/tango.py,sha256=lAl7Su_GgyXFEEKZ1yu_2gU18wXHVaBbGR8RYcIOVYk,2100
471
471
  mxcubecore/utils/units.py,sha256=Gh7ovTUN00XBMUoyDG5W7akCx1pROL-M6pK2z1ouemg,1361
472
- mxcubecore-1.372.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
473
- mxcubecore-1.372.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
474
- mxcubecore-1.372.0.dist-info/METADATA,sha256=EgkRmo0lExoyEJyWe9SQfkEw-SYqEfD3LNReVEjVpS0,4259
475
- mxcubecore-1.372.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
476
- mxcubecore-1.372.0.dist-info/RECORD,,
472
+ mxcubecore-1.373.0.dist-info/COPYING,sha256=u-Mc8zCecwyo4YoP8UulmzCiZZ_MmCLROd_NBtOcRj0,35148
473
+ mxcubecore-1.373.0.dist-info/COPYING.LESSER,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
474
+ mxcubecore-1.373.0.dist-info/METADATA,sha256=RxlY3zEk1cyD3sj9-jwKNlZvic6m6yEchwnJxsRWlhg,4259
475
+ mxcubecore-1.373.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
476
+ mxcubecore-1.373.0.dist-info/RECORD,,