Skip to content

Commit

Permalink
Update bluetooth_devices.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamsorcerer authored Sep 27, 2023
1 parent 435111b commit 7bad2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bluetooth_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ async def switch_to_master(self, device_address: str) -> None:
async def is_slave(self, device_address: str) -> bool:
proc = await asyncio.create_subprocess_exec("sudo", "hcitool", "con", stdout=PIPE, stderr=DEVNULL)
stdout, stderr = await proc.communicate()
return any("SLAVE" in l and device_address in l for l in stdout.split(b"\n"))
return any("SLAVE" in l and device_address in l for l in stdout.decode().split("\n"))

def remove_devices(self) -> None:
print("Removing all BT devices")
Expand Down

0 comments on commit 7bad2e9

Please sign in to comment.