mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-21 00:40:01 +02:00
removes try catch from serializer function to not log error but rather raise exception
This commit is contained in:
parent
7c7bb193e4
commit
cc105106ee
@ -271,21 +271,12 @@ def get_nested_dict_by_path(
|
||||
parent_path_parts, attr_name = path.split(".")[:-1], path.split(".")[-1]
|
||||
current_dict: dict[str, Any] = serialization_dict
|
||||
|
||||
try:
|
||||
for path_part in parent_path_parts:
|
||||
current_dict = get_next_level_dict_by_key(
|
||||
current_dict, path_part, allow_append=False
|
||||
)
|
||||
current_dict = current_dict["value"]
|
||||
for path_part in parent_path_parts:
|
||||
current_dict = get_next_level_dict_by_key(
|
||||
current_dict, attr_name, allow_append=False
|
||||
current_dict, path_part, allow_append=False
|
||||
)
|
||||
|
||||
except (SerializationPathError, SerializationValueError, KeyError) as e:
|
||||
logger.error(e)
|
||||
return {}
|
||||
|
||||
return current_dict
|
||||
current_dict = current_dict["value"]
|
||||
return get_next_level_dict_by_key(current_dict, attr_name, allow_append=False)
|
||||
|
||||
|
||||
def get_next_level_dict_by_key(
|
||||
|
Loading…
x
Reference in New Issue
Block a user