mirror of
https://github.com/naruxde/revpimodio2.git
synced 2025-11-08 22:03:53 +01:00
Reihenfolge des Iterators der Devices ist nun nach Position im Prozessabbild
sortiert und nicht nach Position - Entspricht piCtory
This commit is contained in:
@@ -25,7 +25,7 @@ __all__ = [
|
||||
__author__ = "Sven Sager <akira@revpimodio.org>"
|
||||
__name__ = "revpimodio2"
|
||||
__package__ = "revpimodio2"
|
||||
__version__ = "2.1.5"
|
||||
__version__ = "2.1.6"
|
||||
|
||||
# Global package values
|
||||
OFF = 0
|
||||
|
||||
@@ -72,8 +72,14 @@ class DeviceList(object):
|
||||
|
||||
def __iter__(self):
|
||||
"""Gibt Iterator aller Devices zurueck.
|
||||
|
||||
Die Reihenfolge ist nach Position im Prozessabbild sortiert und nicht
|
||||
nach Position (Dies entspricht der Positionierung aus piCtory)!
|
||||
|
||||
@return <class 'iter'> aller Devices"""
|
||||
for dev in sorted(self.__dict_position):
|
||||
for dev in sorted(
|
||||
self.__dict_position,
|
||||
key=lambda key: self.__dict_position[key]._offset):
|
||||
yield self.__dict_position[dev]
|
||||
|
||||
def __len__(self):
|
||||
|
||||
Reference in New Issue
Block a user