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

media player Kodi: handle TransportError exceptions when calling JSONRPC API methods #8047

Merged
merged 5 commits into from Jun 18, 2017

Conversation

azogue
Copy link
Member

@azogue azogue commented Jun 15, 2017

Description:

Handle TransportError exceptions when calling JSONRPC API services. This exception raises when Kodi is not present or there is a problem in the websocket connection.

Example entry for configuration.yaml (if applicable):

media_player:
  - platform: kodi
    name: Kodi
    host: 192.168.1.X
    port: 8080
    enable_websocket: true
    turn_off_action: quit
    timeout: 10

@mention-bot
Copy link

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

_LOGGER.info("TransportError trying to add playlist",
self.entity_id)
_LOGGER.debug("TransportError trying to add playlist",
self.entity_id, exc_info = True)

Choose a reason for hiding this comment

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

unexpected spaces around keyword / parameter equals

_LOGGER.info("TransportError trying to run API method %s.%s(%s)",
self.entity_id, method, kwargs)
_LOGGER.debug("TransportError trying to run API method %s.%s(%s)",
self.entity_id, method, kwargs, exc_info=True)
Copy link
Member

Choose a reason for hiding this comment

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

Use only one logging call -> warning

Copy link
Member Author

Choose a reason for hiding this comment

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

Done (removed exc_info in debug level)

_LOGGER.info("TransportError trying to add playlist to %s",
self.entity_id)
_LOGGER.debug("TransportError trying to add playlist to %s",
self.entity_id, exc_info=True)
Copy link
Member

Choose a reason for hiding this comment

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

Use only one logging call -> warning

Copy link
Member Author

Choose a reason for hiding this comment

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

Done (removed exc_info in debug level)

@azogue
Copy link
Member Author

azogue commented Jun 17, 2017

Hi @pvizeli, the Travis CI build timed out ¿?, could you restart it to try again?
thanks!

@pvizeli pvizeli merged commit 35132f9 into home-assistant:dev Jun 18, 2017
@azogue azogue deleted the kodi branch June 22, 2017 09:37
@balloob balloob mentioned this pull request Jul 1, 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.

None yet

5 participants