fixing pylint issues

This commit is contained in:
Per Sandstrom 2015-08-05 20:02:39 +02:00
parent db2cbf33c3
commit eb83621fce

View File

@ -58,8 +58,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
""" Sets up the squeezebox platform. """
if not config.get(CONF_HOST):
_LOGGER.error(
"Missing required configuration items in {}: {}".format(
DOMAIN, CONF_HOST))
"Missing required configuration items in %s: %s",
DOMAIN, CONF_HOST)
return False
lms = LogitechMediaServer(
@ -77,6 +77,8 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
class LogitechMediaServer(object):
""" Represents a Logitech media server. """
def __init__(self, host, port, username, password):
self.host = host
self.port = port
@ -92,17 +94,17 @@ class LogitechMediaServer(object):
http_port = self.query('pref', 'httpport', '?')
if not http_port:
_LOGGER.error(
"Unable to read data from server {}:{}".format(
"Unable to read data from server %s:%s",
self.host,
self.port))
self.port)
return
return http_port
except ConnectionError as ex:
_LOGGER.error(
"Failed to connect to server {}:{} - {}".format(
"Failed to connect to server %s:%s - %s",
self.host,
self.port,
ex))
ex)
return
def create_players(self):