diff options
Diffstat (limited to 'parrot_zik')
-rw-r--r-- | parrot_zik/bluetooth_paired_devices.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/parrot_zik/bluetooth_paired_devices.py b/parrot_zik/bluetooth_paired_devices.py index 726731c..f06286a 100644 --- a/parrot_zik/bluetooth_paired_devices.py +++ b/parrot_zik/bluetooth_paired_devices.py @@ -88,7 +88,10 @@ def connect(): host = first_match["host"] sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM) - sock.connect((host, port)) + try: + sock.connect((host, port)) + except bluetooth.btcommon.BluetoothError: + raise ConnectionFailure sock.send('\x00\x03\x00') sock.recv(1024) |