File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ def _survey(self) -> dict[str, _rpc_type]:
157157 if isinstance (attr , _RpcNode ):
158158 # Check if it's an RPC that should be read
159159 if isinstance (attr , _RpcBase ):
160- if attr ._readable and attr . _data_type is not None :
160+ if attr ._data_type not in { None , bytes } :
161161 results [attr .__name__ ] = attr ()
162162
163163 # Recursively survey children (works for both Rpc and Survey)
@@ -169,8 +169,8 @@ class _RpcBase(_RpcNode):
169169 def __init__ (self , pyrpc : _twinleaf ._Rpc , device : Device ):
170170 super ().__init__ (pyrpc .name , device )
171171 self ._size_bytes = pyrpc .size_bytes
172- self ._readable = pyrpc .readable
173172 self ._writable = pyrpc .writable
173+ self ._data_type : type | None = None
174174 match pyrpc .type_str :
175175 case t if t .startswith ('i' ): self ._data_type , self ._signed = int , True
176176 case t if t .startswith ('u' ): self ._data_type , self ._signed = int , False
You can’t perform that action at this time.
0 commit comments