From 4e0c9dd18c955ffa9d0e51b5574dfa018873195a Mon Sep 17 00:00:00 2001 From: Maciej Bieniek Date: Wed, 9 Jun 2021 11:52:21 +0200 Subject: [PATCH] Increase test coverage in Brother integration (#51657) --- homeassistant/components/brother/config_flow.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/brother/config_flow.py b/homeassistant/components/brother/config_flow.py index 353c8b05ed5..08daf0155a1 100644 --- a/homeassistant/components/brother/config_flow.py +++ b/homeassistant/components/brother/config_flow.py @@ -30,9 +30,9 @@ def host_valid(host: str) -> bool: if ipaddress.ip_address(host).version in [4, 6]: return True except ValueError: - disallowed = re.compile(r"[^a-zA-Z\d\-]") - return all(x and not disallowed.search(x) for x in host.split(".")) - return False + pass + disallowed = re.compile(r"[^a-zA-Z\d\-]") + return all(x and not disallowed.search(x) for x in host.split(".")) class BrotherConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):