mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
error when msg_hash was not here
This commit is contained in:
parent
9f66885594
commit
91be955044
1 changed files with 1 additions and 1 deletions
|
|
@ -226,7 +226,7 @@ class MessageReader:
|
|||
# search for text in log_channels
|
||||
txt_hash = int.from_bytes(SHA256.new(text).digest()[0:4], "little", signed=False)
|
||||
if self.decrypt_channels:
|
||||
logged = next((l for l in self.channels_log if l['msg_hash'] == txt_hash), None)
|
||||
logged = next((l for l in self.channels_log if 'msg_hash' in l and l['msg_hash'] == txt_hash), None)
|
||||
if not logged is None:
|
||||
res["path"] = logged["path"]
|
||||
res["RSSI"] = logged["rssi"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue