Skip to content

Commit 3c04294

Browse files
committed
wip: cast int to str for tango nodes
1 parent ea0fb4e commit 3c04294

File tree

1 file changed

+4
-3
lines changed
  • src/fastcs/transport/tango

1 file changed

+4
-3
lines changed

src/fastcs/transport/tango/dsr.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _collect_dev_attributes(
6161
) -> dict[str, Any]:
6262
collection: dict[str, Any] = {}
6363
for controller_api in root_controller_api.walk_api():
64-
path = controller_api.path
64+
path = [str(node) for node in controller_api.path]
6565

6666
for attr_name, attribute in controller_api.attributes.items():
6767
attr_name = attr_name.title().replace("_", "")
@@ -109,7 +109,8 @@ def _wrap_command_f(
109109
) -> Callable[..., Awaitable[None]]:
110110
async def _dynamic_f(tango_device: Device) -> None:
111111
tango_device.info_stream(
112-
f"called {'_'.join(controller_api.path)} f method: {method_name}"
112+
f"called {'_'.join([str(node) for node in controller_api.path])} "
113+
f"f method: {method_name}"
113114
)
114115

115116
coro = method()
@@ -125,7 +126,7 @@ def _collect_dev_commands(
125126
) -> dict[str, Any]:
126127
collection: dict[str, Any] = {}
127128
for controller_api in root_controller_api.walk_api():
128-
path = controller_api.path
129+
path = [str(node) for node in controller_api.path]
129130

130131
for name, method in controller_api.command_methods.items():
131132
cmd_name = name.title().replace("_", "")

0 commit comments

Comments
 (0)