aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'netlib/utils.py')
-rw-r--r--netlib/utils.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/netlib/utils.py b/netlib/utils.py
index 6fed44b6..799b0d42 100644
--- a/netlib/utils.py
+++ b/netlib/utils.py
@@ -141,6 +141,12 @@ _label_valid = re.compile(b"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
def is_valid_host(host):
+ """
+ Checks if a hostname is valid.
+
+ Args:
+ host (bytes): The hostname
+ """
try:
host.decode("idna")
except ValueError: