Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bluetooth.py: handle discover_devices returning bytes (instead of str) #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rrhartjr
Copy link
Contributor

discover_devices returns bytes instead of str (might be unique to macOS or the latest version of pybluez/lightblue?)

@@ -122,6 +122,8 @@ def find(self, host=None, name=None, **kwargs):
else:
devhost, devname = dev, None
if (host is None or devhost == host) and (name is None or devname == name):
if type(devhost) is bytes:
devhost = devhost.decode('utf8')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be done earlier, so that it can be compared with host in the if condition.

@schodet
Copy link
Owner

schodet commented Jun 26, 2022

Is there the same problem when looking up names? Can you open an issue on pybluez so that they can fix it?

@schodet
Copy link
Owner

schodet commented Jul 18, 2022

Hi!

Are you still interested in merging this PR, is there something I can do to help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants