aboutsummaryrefslogtreecommitdiff
path: root/parrot_zik/bluetooth_paired_devices.py
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-05-05 12:26:24 +0200
committerneodarz <neodarz@neodarz.net>2019-05-05 12:26:26 +0200
commitcce51d8a961cb5b6af21cd44b357defc39e1b008 (patch)
tree7315619675f5b7e402069c12160f9d2fc0bfa386 /parrot_zik/bluetooth_paired_devices.py
parent3f8786741afa17c30e23186c465fe870b2de9efe (diff)
downloadpyParrotZikTCP-cce51d8a961cb5b6af21cd44b357defc39e1b008.tar.xz
pyParrotZikTCP-cce51d8a961cb5b6af21cd44b357defc39e1b008.zip
Make code compatible with python3 with python2 support
Warning: This is a preparation work for completly remove PyGTK. Because PyGTK is python2 only, most part of the code didn't work. But a last commands send to the headset is fonctional (This is why all this change).
Diffstat (limited to '')
-rw-r--r--parrot_zik/bluetooth_paired_devices.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/parrot_zik/bluetooth_paired_devices.py b/parrot_zik/bluetooth_paired_devices.py
index 5f5d443..626c5e6 100644
--- a/parrot_zik/bluetooth_paired_devices.py
+++ b/parrot_zik/bluetooth_paired_devices.py
@@ -59,7 +59,7 @@ class BluetoothCmdDeviceManager(BluetoothDeviceManager):
def get_mac(self):
pipe = Popen(['bluetoothctl'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
- res = pipe.communicate("exit")
+ res = str(pipe.communicate("exit".encode("UTF-8")))
if len(res) > 0 and res[0]:
match = p.search(res[0])
if match: