aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 01:56:23 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 01:56:23 +0200
commiteac6cdf7521d6514072e1f91958bbc0f1bc29b70 (patch)
treecdf73e28f43c4168f15d85944a7bb0bc9b3f56ab
parentbd0c2445f53e8c049fe7cc4c1b4e2e0a11418bc1 (diff)
downloadpyParrotZikTCP-eac6cdf7521d6514072e1f91958bbc0f1bc29b70.tar.xz
pyParrotZikTCP-eac6cdf7521d6514072e1f91958bbc0f1bc29b70.zip
Refactor.
Diffstat (limited to '')
-rw-r--r--bluetooth_paired_devices.py3
1 files changed, 1 insertions, 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)