Use HTTP_OK constant (#33798)
* Use http ok constant * Remove incorrect use * Run isort * Fix pylint by adding missing imports * Fix pylint by fixing one import
This commit is contained in:
parent
7383e81609
commit
8d61893c39
79 changed files with 214 additions and 154 deletions
|
@ -18,6 +18,7 @@ from homeassistant.const import (
|
|||
CONF_SSL,
|
||||
CONF_USERNAME,
|
||||
CONF_VERIFY_SSL,
|
||||
HTTP_OK,
|
||||
)
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
||||
|
@ -102,7 +103,7 @@ class TomatoDeviceScanner(DeviceScanner):
|
|||
|
||||
# Calling and parsing the Tomato api here. We only need the
|
||||
# wldev and dhcpd_lease values.
|
||||
if response.status_code == 200:
|
||||
if response.status_code == HTTP_OK:
|
||||
|
||||
for param, value in self.parse_api_pattern.findall(response.text):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue