Skip to content
Snippets Groups Projects
Commit fc07032d authored by jamespcole's avatar jamespcole
Browse files

Fixed some code formatting and added dd-wrt to the readme

parent 7e6af571
Branches
Tags
No related merge requests found
......@@ -16,6 +16,7 @@ MIN_TIME_BETWEEN_SCANS = timedelta(seconds=5)
_LOGGER = logging.getLogger(__name__)
# pylint: disable=unused-argument
def get_scanner(hass, config):
""" Validates config and returns a DdWrt scanner. """
if not validate_config(config,
......@@ -131,8 +132,10 @@ class DdWrtDeviceScanner(object):
def get_ddwrt_data(self, url):
""" Retrieve data from DD-WRT and return parsed result """
try:
response = requests.get(url, auth=(self.username,
self.password), timeout=4)
response = requests.get(url, auth=(
self.username,
self.password),
timeout=4)
except requests.exceptions.Timeout:
_LOGGER.exception("Connection to the router timed out")
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment