mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-20 00:10:03 +02:00
proxy class will raise exception raised on server when setting value
This commit is contained in:
parent
92e2c0e8ef
commit
7d399df158
@ -30,7 +30,6 @@ class ProxyClassFactory:
|
||||
|
||||
def create_proxy(self, data: SerializedObject) -> "ProxyClass":
|
||||
proxy: "ProxyClass" = self._deserialize(data)
|
||||
proxy._sio = self.sio_client
|
||||
return proxy
|
||||
|
||||
def _deserialize(self, serialized_object: SerializedObject) -> Any:
|
||||
@ -139,13 +138,18 @@ class ProxyClassFactory:
|
||||
get.__doc__ = serialized_attr["doc"]
|
||||
|
||||
def set(self: "ProxyClass", value: Any) -> None: # type: ignore
|
||||
result = cast(
|
||||
SerializedObject | None,
|
||||
self._sio.call(
|
||||
"update_value",
|
||||
{
|
||||
"access_path": serialized_attr["full_access_path"],
|
||||
"value": dump(value),
|
||||
},
|
||||
),
|
||||
)
|
||||
if result is not None:
|
||||
loads(result)
|
||||
|
||||
if serialized_attr["readonly"]:
|
||||
return property(get)
|
||||
|
Loading…
x
Reference in New Issue
Block a user