diff --git a/pathod/language/__init__.py b/pathod/language/__init__.py index 0841196e8..a43424eaf 100644 --- a/pathod/language/__init__.py +++ b/pathod/language/__init__.py @@ -31,7 +31,7 @@ def parse_pathod(s, use_http2=False): May raise ParseException """ try: - s = s.decode("ascii") + s.encode("ascii") except UnicodeError: raise exceptions.ParseException("Spec must be valid ASCII.", 0, 0) try: @@ -53,7 +53,7 @@ def parse_pathod(s, use_http2=False): def parse_pathoc(s, use_http2=False): try: - s = s.decode("ascii") + s.encode("ascii") except UnicodeError: raise exceptions.ParseException("Spec must be valid ASCII.", 0, 0) try: