Skip to content

Commit

Permalink
examples/bluetooth: Fix check for _conn_handle being None.
Browse files Browse the repository at this point in the history
Fixes issue #10755.

Signed-off-by: Damien George <damien@micropython.org>
  • Loading branch information
dpgeorge committed Feb 15, 2023
1 parent 41ed01f commit e1f211c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/bluetooth/ble_simple_central.py
Expand Up @@ -179,7 +179,7 @@ def connect(self, addr_type=None, addr=None, callback=None):

# 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()
Expand Down
2 changes: 1 addition & 1 deletion examples/bluetooth/ble_temperature_central.py
Expand Up @@ -196,7 +196,7 @@ def connect(self, addr_type=None, addr=None, callback=None):

# 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()
Expand Down

0 comments on commit e1f211c

Please sign in to comment.