diff --git a/samsungctl/__main__.py b/samsungctl/__main__.py index a85d194..f2ac959 100644 --- a/samsungctl/__main__.py +++ b/samsungctl/__main__.py @@ -52,7 +52,7 @@ def _read_config(): try: config_json = json.load(config_file) except ValueError as e: - messsage = "Warning: Could not parse the configuration file.\n %s" + message = "Warning: Could not parse the configuration file.\n %s" logging.warning(message, e) return config @@ -122,7 +122,7 @@ def main(): except exceptions.AccessDenied: logging.error("Error: Access denied!") except exceptions.UnknownMethod: - logging.error("Error: Unknown method '{}'".format(config["method"])) + logging.error("Error: Unknown method '%s'", config["method"]) except socket.timeout: logging.error("Error: Timed out!") except OSError as e: diff --git a/samsungctl/remote.py b/samsungctl/remote.py index a870d2c..03fcb40 100644 --- a/samsungctl/remote.py +++ b/samsungctl/remote.py @@ -3,7 +3,7 @@ from .remote_websocket import RemoteWebsocket -class Remote: +class Remote(object): def __init__(self, config): if config["method"] == "legacy": self.remote = RemoteLegacy(config) diff --git a/samsungctl/remote_legacy.py b/samsungctl/remote_legacy.py index 2adc0da..65dbd97 100644 --- a/samsungctl/remote_legacy.py +++ b/samsungctl/remote_legacy.py @@ -6,7 +6,7 @@ from . import exceptions -class RemoteLegacy(): +class RemoteLegacy(object): """Object for remote control connection.""" def __init__(self, config): diff --git a/samsungctl/remote_websocket.py b/samsungctl/remote_websocket.py index 6fad461..b464557 100644 --- a/samsungctl/remote_websocket.py +++ b/samsungctl/remote_websocket.py @@ -1,7 +1,6 @@ import base64 import json import logging -import socket import time from . import exceptions @@ -10,7 +9,7 @@ URL_FORMAT = "ws://{}:{}/api/v2/channels/samsung.remote.control?name={}" -class RemoteWebsocket(): +class RemoteWebsocket(object): """Object for remote control connection.""" def __init__(self, config):