mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-06-07 22:10:41 +02:00
adapts autostart to support nested lists in dicts and vice versa
This commit is contained in:
parent
20028c379d
commit
56dd9dd8aa
@ -18,6 +18,7 @@ def autostart_service_tasks(
|
|||||||
|
|
||||||
for attr in dir(service):
|
for attr in dir(service):
|
||||||
if is_property_attribute(service, attr) or attr in {
|
if is_property_attribute(service, attr) or attr in {
|
||||||
|
"_observers",
|
||||||
"__dict__",
|
"__dict__",
|
||||||
}: # prevent eval of property attrs and recursion
|
}: # prevent eval of property attrs and recursion
|
||||||
continue
|
continue
|
||||||
@ -40,7 +41,7 @@ def autostart_nested_service_tasks(
|
|||||||
autostart_service_tasks(service)
|
autostart_service_tasks(service)
|
||||||
elif isinstance(service, list):
|
elif isinstance(service, list):
|
||||||
for entry in service:
|
for entry in service:
|
||||||
autostart_service_tasks(entry)
|
autostart_nested_service_tasks(entry)
|
||||||
elif isinstance(service, dict):
|
elif isinstance(service, dict):
|
||||||
for entry in service.values():
|
for entry in service.values():
|
||||||
autostart_service_tasks(entry)
|
autostart_nested_service_tasks(entry)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user