Skip to content

Commit 7ea8ef4

Browse files
committed
scripts: shell: ble_console: bluez_communication: Fix formatting
Fixes the file formatting to use spaces instead of tabes and have brackets around the print statement Signed-off-by: Jamie McCrae <[email protected]>
1 parent 7a4f0e9 commit 7ea8ef4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

scripts/shell/ble_console/BlueZ_communication.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ def __init__(self, read_handler, message):
4747
(self.bluez_maj, self.bluez_min) = self.get_bluez_version()
4848

4949
def get_bluez_version(self):
50-
bashCommand = 'bluetoothd -v'
50+
bashCommand = 'bluetoothd -v'
5151
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)
5252
output, error = process.communicate()
53-
output = output.split('.')
54-
return (int(output[0],10), int(output[1],10))
53+
output = output.split('.')
54+
return (int(output[0],10), int(output[1],10))
5555

5656
def get_device_name(self, device):
5757
for dev in self.device_list:
@@ -163,8 +163,8 @@ def write_bluetooth(self, device, text):
163163
if device in dev.path:
164164
try:
165165
if (self.bluez_maj > 5 or (self.bluez_maj == 5
166-
and self.bluez_min > 39)):
167-
dev.rx_interface.WriteValue(message, {})
166+
and self.bluez_min > 39)):
167+
dev.rx_interface.WriteValue(message, {})
168168
else:
169169
dev.rx_interface.WriteValue(message)
170170
except dbus.DBusException as e:
@@ -173,7 +173,7 @@ def write_bluetooth(self, device, text):
173173
elif "Did not receive a reply" in e.args[0]:
174174
self.display_message("Timeout exceeded :" + device)
175175
else:
176-
print e.args
176+
print(e.args)
177177

178178
def enable_notification(self, device):
179179
try:

0 commit comments

Comments
 (0)