From 915b9145f6bd6bd4e2b41d3e92a0950335d816e4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 4 Jan 2020 11:46:25 +0200 Subject: [PATCH] Filter boards by ID+Name --- platformio/commands/boards.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio/commands/boards.py b/platformio/commands/boards.py index 335d1b34..7d15df2f 100644 --- a/platformio/commands/boards.py +++ b/platformio/commands/boards.py @@ -32,7 +32,7 @@ def cli(query, installed, json_output): # pylint: disable=R0912 grpboards = {} for board in _get_boards(installed): - if query and query.lower() not in json.dumps(board).lower(): + if query and not any(query.lower() in board[k] for k in ("id", "name")): continue if board["platform"] not in grpboards: grpboards[board["platform"]] = []