Skip to content

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

Merged
pvizeli merged 5 commits into
home-assistant:devfrom
azogue:kodi
Jun 18, 2017
Merged

media player Kodi: handle TransportError exceptions when calling JSONRPC API methods#8047
pvizeli merged 5 commits into
home-assistant:devfrom
azogue:kodi

Conversation

@azogue
Copy link
Copy Markdown
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
Copy Markdown

@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)
Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

5 participants