aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/utils.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2016-07-07 09:48:22 +0200
committerGitHub <noreply@github.com>2016-07-07 09:48:22 +0200
commit64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9 (patch)
treebd1e5e6255f909d85e54d8a4e6f50aba6d0d2630 /netlib/utils.py
parent605a4fd2fda2249ffeb4e34117910700e1a6353f (diff)
parent64a867973d5bac136c2e1c3c11c457d6b04d6649 (diff)
downloadmitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.tar.gz
mitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.tar.bz2
mitmproxy-64ac2c73fe1c10bda9c5ff348e81f6dfaa7439b9.zip
Merge pull request #1318 from mhils/tnetstring3-unicode-type
[tests actually pass] Add unicode to tnetstring3
Diffstat (limited to 'netlib/utils.py')
-rw-r--r--netlib/utils.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/netlib/utils.py b/netlib/utils.py
index 79340cbd..23c16dc3 100644
--- a/netlib/utils.py
+++ b/netlib/utils.py
@@ -73,11 +73,9 @@ _label_valid = re.compile(b"(?!-)[A-Z\d-]{1,63}(?<!-)$", re.IGNORECASE)
def is_valid_host(host):
+ # type: (bytes) -> bool
"""
Checks if a hostname is valid.
-
- Args:
- host (bytes): The hostname
"""
try:
host.decode("idna")