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

locks() returns both device types #48

Closed
thomkaufmann opened this issue May 14, 2020 · 1 comment
Closed

locks() returns both device types #48

thomkaufmann opened this issue May 14, 2020 · 1 comment

Comments

@thomkaufmann
Copy link
Contributor

The problem seems to be in _get_devices() where the condition on self.list(device_type=device_type) is ignored when device_type is 0.
It works properly for openers(), returning just devices of device_type 2.

@pschmitt
Copy link
Owner

Ah! Right this is due to the following check:

if device_type:

This prints out "nope" twice:

varNone = None
var0 = 0

if varNone:
  print("varNone passed the test")
else:
  print("nope")

if var0:
  print("var0 passed the test")
else:
  print("nope")

The test should be ìf device_type is not None.

Will fix asap. Thanks!

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

No branches or pull requests

2 participants