Skip to content

Commit d828454

Browse files
author
ludruda
committed
minor fixes
1 parent 897b23c commit d828454

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

src/iotc/aio/__init__.py

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,16 +234,19 @@ async def _on_commands(self):
234234
except asyncio.CancelledError:
235235
return
236236
command = Command(method_request.name, method_request.payload)
237-
command_name_with_components = method_request.name.split("*")
238-
239-
if len(command_name_with_components) > 1:
240-
# In a component
241-
await self._logger.debug("Command in a component")
242-
command = Command(
243-
command_name_with_components[1],
244-
method_request.payload,
245-
command_name_with_components[0],
246-
)
237+
try:
238+
command_name_with_components = method_request.name.split("*")
239+
240+
if len(command_name_with_components) > 1:
241+
# In a component
242+
await self._logger.debug("Command in a component")
243+
command = Command(
244+
command_name_with_components[1],
245+
method_request.payload,
246+
command_name_with_components[0],
247+
)
248+
except:
249+
pass
247250

248251
async def reply_fn():
249252
await self._device_client.send_method_response(

0 commit comments

Comments
 (0)