From b28cdefe8ab19e019268c0a5aae6862268840bc2 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Fri, 22 Nov 2024 09:34:50 +0100 Subject: [PATCH] follow up change for 'better order of accessibles' (34904) slight change to make it compatible with py 3.6/3.7, where reversed() was not allowed. Change-Id: Id440870b5523a866b3afb470ba5db9cd6a9bb0ec Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/35002 Tested-by: Jenkins Automated Tests Reviewed-by: Markus Zolliker --- frappy/modulebase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappy/modulebase.py b/frappy/modulebase.py index 2fc0fc9..420e3d7 100644 --- a/frappy/modulebase.py +++ b/frappy/modulebase.py @@ -41,7 +41,7 @@ from frappy.logging import RemoteLogHandler # from .interfaces import SECoP_BASE_CLASSES # WORKAROUND: SECoP_BASE_CLASSES = ['Readable', 'Writable', 'Drivable', 'Communicator'] -PREDEF_ORDER = list(reversed(PREDEFINED_ACCESSIBLES)) +PREDEF_ORDER = list(PREDEFINED_ACCESSIBLES) Done = UniqueObject('Done') """a special return value for a read_/write_ method @@ -101,7 +101,7 @@ class HasAccessibles(HasProperties): # rebuild order: # (1) predefined accessibles, in a predefined order, (2) inherited custom items, (3) new custom items # move (1) to the beginning - for key in PREDEF_ORDER: + for key in reversed(PREDEF_ORDER): if key in accessibles: accessibles.move_to_end(key, last=False) # move (3) to the end