summaryrefslogtreecommitdiffstats
path: root/Lib/encodings/punycode.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/encodings/punycode.py')
-rw-r--r--Lib/encodings/punycode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/encodings/punycode.py b/Lib/encodings/punycode.py
index b801a46..8129af2 100644
--- a/Lib/encodings/punycode.py
+++ b/Lib/encodings/punycode.py
@@ -183,6 +183,8 @@ def insertion_sort(base, extended, errors):
def punycode_decode(text, errors):
if isinstance(text, str):
text = text.encode("ascii")
+ if isinstance(text, memoryview):
+ text = bytes(text)
pos = text.rfind(b"-")
if pos == -1:
base = ""