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

Hassio cleanup part2 #12588

Merged
merged 7 commits into from
Feb 21, 2018
Merged

Hassio cleanup part2 #12588

merged 7 commits into from
Feb 21, 2018

Conversation

pvizeli
Copy link
Member

@pvizeli pvizeli commented Feb 21, 2018

Description:

  • Write more tests
  • Cleanup handler to write better tests

data = yield from funct(*argv, **kwargs)
if data and data['result'] == "ok":
return data['data']
return None
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this make you lose what's inside data if result != ok ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes: https://github.com/home-assistant/hassio/blob/dev/API.md#hassio-restful-api there is only a data on 'ok'. On 'error' there is a message. Maybe we can log this message if available.

Copy link
Member

Choose a reason for hiding this comment

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

That would be great. I am not a fan of silent errors. I prefer raising.

@pvizeli pvizeli merged commit b228695 into dev Feb 21, 2018
@pvizeli pvizeli deleted the hassio-refactory branch February 21, 2018 21:43
@balloob balloob mentioned this pull request Feb 22, 2018
@home-assistant home-assistant locked and limited conversation to collaborators May 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants