]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Remove code in _escapify() that can never run.
authorBob Halley <halley@dnspython.org>
Fri, 3 Jul 2020 21:58:18 +0000 (14:58 -0700)
committerBob Halley <halley@dnspython.org>
Fri, 3 Jul 2020 21:58:18 +0000 (14:58 -0700)
dns/name.py

index 477d0b742fffc870d973596be4b8508f17b603fa..529ae7f9fe994e0671aaf616d57ada0d048713de 100644 (file)
@@ -241,8 +241,6 @@ def _escapify(label):
         # Ordinary DNS label mode.  Escape special characters and values
         # < 0x20 or > 0x7f.
         text = ''
-        if isinstance(label, str):
-            label = label.encode()
         for c in label:
             if c in _escaped:
                 text += '\\' + chr(c)