Skip to content

Fixed openhome metadata issue#7932

Merged
balloob merged 1 commit into
home-assistant:devfrom
bazwilliams:openhome-artist-fix
Jun 9, 2017
Merged

Fixed openhome metadata issue#7932
balloob merged 1 commit into
home-assistant:devfrom
bazwilliams:openhome-artist-fix

Conversation

@bazwilliams
Copy link
Copy Markdown
Contributor

Description:

A change in the openhomedevice library now means some metadata might not be present when requesting track information. I forgot to defend against this and as a result when the metadata is not present an key exception is thrown.

This also stops devices from being registered on discovery due to the call of 'update' when adding.

Related issue (if applicable): fixes #7926

Checklist:

If the code communicates with devices, web services, or third-party tools:

  • Local tests with tox run successfully. Your PR cannot be merged unless tests pass
  • New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
  • New dependencies are only imported inside functions that use them ([example][ex-import]).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

@mention-bot
Copy link
Copy Markdown

@bazwilliams, thanks for your PR! By analyzing the history of the files in this pull request, we identified @balloob and @fabaff to be potential reviewers.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

line too long (85 > 79 characters)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

continuation line with same indent as next logical line

Copy link
Copy Markdown
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

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

instead this 2 lines use:

return self._track_information.get('albumArtwork')

Change also the quote to single. Make sure that the update() make a empty dict if no data are available and set that also on init.

@balloob balloob added this to the 0.46.1 milestone Jun 9, 2017
@balloob balloob merged commit e4d100d into home-assistant:dev Jun 9, 2017
@balloob
Copy link
Copy Markdown
Member

balloob commented Jun 9, 2017

Cherry-picked for 0.46.1

balloob pushed a commit that referenced this pull request Jun 9, 2017
@balloob balloob mentioned this pull request Jun 9, 2017
@balloob balloob mentioned this pull request Jun 16, 2017
@home-assistant home-assistant locked and limited conversation to collaborators Oct 20, 2017
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.

Openhome discovery failure.

7 participants