From eac6cdf7521d6514072e1f91958bbc0f1bc29b70 Mon Sep 17 00:00:00 2001 From: Marek Siarkowicz Date: Mon, 15 Jun 2015 01:56:23 +0200 Subject: Refactor. --- bluetooth_paired_devices.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bluetooth_paired_devices.py b/bluetooth_paired_devices.py index ce86d53..fead080 100644 --- a/bluetooth_paired_devices.py +++ b/bluetooth_paired_devices.py @@ -77,14 +77,13 @@ def connect(): if len(service_matches) == 0: raise ConnectionFailure + first_match = service_matches[0] if sys.platform == "darwin": - first_match = service_matches[0] host = first_match[0] port = first_match[1] sock = lightblue.socket() else: - first_match = service_matches[0] port = first_match["port"] host = first_match["host"] sock = bluetooth.BluetoothSocket(bluetooth.RFCOMM) -- cgit v1.2.1