mirror of
https://github.com/meshcore-dev/meshcore-cli.git
synced 2026-04-20 22:13:48 +00:00
deal with error_code not in payload for scope error
This commit is contained in:
parent
7b0631bc4b
commit
ae10bb701a
1 changed files with 5 additions and 2 deletions
|
|
@ -1604,8 +1604,11 @@ async def set_scope (mc, scope) :
|
|||
return scope
|
||||
|
||||
res = await mc.commands.set_flood_scope(scope)
|
||||
if res is None or res.type == EventType.ERROR:
|
||||
if not res is None and res.payload["error_code"] == 1: #unsupported
|
||||
if res is None :
|
||||
return None
|
||||
|
||||
if res.type == EventType.ERROR:
|
||||
if "error_code" in res.payload and res.payload["error_code"] == 1: #unsupported
|
||||
set_scope.has_scope = False
|
||||
return None
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue