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

Fix CLI for HS300 #177

Merged
merged 1 commit into from Jul 25, 2019
Merged

Fix CLI for HS300 #177

merged 1 commit into from Jul 25, 2019

Conversation

dberlin
Copy link
Contributor

@dberlin dberlin commented Jul 25, 2019

The array of on states is returned by get_is_on, not is_on
Before this change, running discover will give:
File "cli.py", line 167, in state
is_on = dev.is_on()
TypeError: 'bool' object is not callable

This is because is_on is a property.
If you use is_on here, it crashes a few lines later anyway because it indexes into it expecting it to be an array.
Which is what get_is_on returns.

With this change, everything works in discover.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.278% when pulling ef83516 on dberlin:master into 2d60467 on GadgetReactor:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.278% when pulling ef83516 on dberlin:master into 2d60467 on GadgetReactor:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 80.278% when pulling ef83516 on dberlin:master into 2d60467 on GadgetReactor:master.

Copy link
Collaborator

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

Thanks, looks straightforward to me!

@rytilahti rytilahti merged commit fa0c2d8 into GadgetReactor:master Jul 25, 2019
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.

None yet

3 participants