summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-02-15 14:14:49 +1100
committerDamien George <damien@micropython.org>2023-02-15 14:14:49 +1100
commite1f211c6b503a0ad8246b289447e9985e629601c (patch)
tree1b7eedfa951d4e80feb48052d9a3dcc33620c6fd
parent41ed01f1394ea608bf9d055120d671e2765cd9b7 (diff)
downloadmicropython-e1f211c6b503a0ad8246b289447e9985e629601c.tar.gz
micropython-e1f211c6b503a0ad8246b289447e9985e629601c.zip
examples/bluetooth: Fix check for _conn_handle being None.
Fixes issue #10755. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--examples/bluetooth/ble_simple_central.py2
-rw-r--r--examples/bluetooth/ble_temperature_central.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/bluetooth/ble_simple_central.py b/examples/bluetooth/ble_simple_central.py
index a6bbdc6ee0..3c0cf2a0d4 100644
--- a/examples/bluetooth/ble_simple_central.py
+++ b/examples/bluetooth/ble_simple_central.py
@@ -179,7 +179,7 @@ class BLESimpleCentral:
# Disconnect from current device.
def disconnect(self):
- if not self._conn_handle:
+ if self._conn_handle is None:
return
self._ble.gap_disconnect(self._conn_handle)
self._reset()
diff --git a/examples/bluetooth/ble_temperature_central.py b/examples/bluetooth/ble_temperature_central.py
index 96c4aad144..80e3c3fb30 100644
--- a/examples/bluetooth/ble_temperature_central.py
+++ b/examples/bluetooth/ble_temperature_central.py
@@ -196,7 +196,7 @@ class BLETemperatureCentral:
# Disconnect from current device.
def disconnect(self):
- if not self._conn_handle:
+ if self._conn_handle is None:
return
self._ble.gap_disconnect(self._conn_handle)
self._reset()