mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
solved issue when no custom variable
This commit is contained in:
parent
ec5077110d
commit
3a26acee93
1 changed files with 5 additions and 4 deletions
|
|
@ -205,10 +205,11 @@ class MessageReader:
|
|||
logger.debug(f"received custom vars response: {data.hex()}")
|
||||
res = {}
|
||||
rawdata = data[1:].decode()
|
||||
pairs = rawdata.split(",")
|
||||
for p in pairs :
|
||||
psplit = p.split(":")
|
||||
res[psplit[0]] = psplit[1]
|
||||
if not rawdata == "" :
|
||||
pairs = rawdata.split(",")
|
||||
for p in pairs :
|
||||
psplit = p.split(":")
|
||||
res[psplit[0]] = psplit[1]
|
||||
logger.debug(f"got custom vars : {res}")
|
||||
await self.dispatcher.dispatch(Event(EventType.CUSTOM_VARS, res))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue