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

iface argument does not accept strings #15

Open
MoshiBin opened this issue Nov 3, 2019 · 0 comments
Open

iface argument does not accept strings #15

MoshiBin opened this issue Nov 3, 2019 · 0 comments
Labels
good first issue Good for newcomers

Comments

@MoshiBin
Copy link
Owner

MoshiBin commented Nov 3, 2019

This doesn't work:

>>> client = SSDPClient(iface="eth0")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/ssdpy/client.py", line 34, in __init__
    self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_BINDTODEVICE, iface)
TypeError: a bytes-like object is required, not 'str'

This does:

>>> client = SSDPClient(iface=b"eth0")

It's unintuitive to pass a bytes object here; SSDPClient should convert a string type implicitly.

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

No branches or pull requests

1 participant