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":
|
def create_proxy(self, data: SerializedObject) -> "ProxyClass":
|
||||||
proxy: "ProxyClass" = self._deserialize(data)
|
proxy: "ProxyClass" = self._deserialize(data)
|
||||||
proxy._sio = self.sio_client
|
|
||||||
return proxy
|
return proxy
|
||||||
|
|
||||||
def _deserialize(self, serialized_object: SerializedObject) -> Any:
|
def _deserialize(self, serialized_object: SerializedObject) -> Any:
|
||||||
@ -139,13 +138,18 @@ class ProxyClassFactory:
|
|||||||
get.__doc__ = serialized_attr["doc"]
|
get.__doc__ = serialized_attr["doc"]
|
||||||
|
|
||||||
def set(self: "ProxyClass", value: Any) -> None: # type: ignore
|
def set(self: "ProxyClass", value: Any) -> None: # type: ignore
|
||||||
self._sio.call(
|
result = cast(
|
||||||
"update_value",
|
SerializedObject | None,
|
||||||
{
|
self._sio.call(
|
||||||
"access_path": serialized_attr["full_access_path"],
|
"update_value",
|
||||||
"value": dump(value),
|
{
|
||||||
},
|
"access_path": serialized_attr["full_access_path"],
|
||||||
|
"value": dump(value),
|
||||||
|
},
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
if result is not None:
|
||||||
|
loads(result)
|
||||||
|
|
||||||
if serialized_attr["readonly"]:
|
if serialized_attr["readonly"]:
|
||||||
return property(get)
|
return property(get)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user