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

Recover from rare error condition from LIRC #2267

Merged
merged 5 commits into from
Jun 10, 2016

Conversation

partofthething
Copy link
Contributor

Description:
This handles a rare but occasional error condition from LIRC. This only happened a few times to me but it crashed the module "for good" and I had to restart HASS to get IR commands working again. With this fix, it's more robust.

Checklist:

If code communicates with devices:

  • Local tests with tox run successfully.... actually there are some unrelated unit test failures...

try:
code = lirc.nextcode() # list; empty if no buttons pressed
except lirc.NextCodeError:
_LOGGER.warning('Encountered error reading next code from LIRC')

Choose a reason for hiding this comment

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

farcy v1.1

  • 80: E501 line too long (80 > 79 characters)

@balloob
Copy link
Member

balloob commented Jun 10, 2016

Looks good! 🐬

@balloob balloob merged commit c229d9e into home-assistant:dev Jun 10, 2016
balloob pushed a commit that referenced this pull request Jun 12, 2016
* More resilient accessing of LIRC codes to handle rare error case.

* Line length fix in LIRC
@home-assistant home-assistant locked and limited conversation to collaborators Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants