From 133effc3560929baa96e11da144550b5601f94ac Mon Sep 17 00:00:00 2001 From: Florent Date: Sat, 1 Nov 2025 20:57:09 +0100 Subject: [PATCH] searching wrong device while reconnecting after error --- pyproject.toml | 2 +- src/meshcore_cli/meshcore_cli.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 76d6358..6ed70c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "meshcore-cli" -version = "1.2.0" +version = "1.2.1" authors = [ { name="Florent de Lamotte", email="florent@frizoncorrea.fr" }, ] diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 58238fa..55e3cd5 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -30,7 +30,7 @@ import re from meshcore import MeshCore, EventType, logger # Version -VERSION = "v1.2.0" +VERSION = "v1.2.1" # default ble address is stored in a config file MCCLI_CONFIG_DIR = str(Path.home()) + "/.config/meshcore/" @@ -2843,7 +2843,7 @@ async def main(argv): mc = await MeshCore.create_ble(address=address, device=device, client=client, debug=debug, only_error=json_output, pin=pin) except ConnectionError : logger.info("Error while connecting, retrying once ...") - if device is None or client is None: # Search for device + if device is None and client is None: # Search for device logger.info(f"Scanning BLE for device matching {address}") devices = await BleakScanner.discover(timeout=timeout) found = False