Skip to content

Commit e00aea9

Browse files
author
Ángel González
committed
Store non_name_characters in a list, not a str
Fixes a «'ascii' codec can't decode» error on filter_characters
1 parent c4c6a70 commit e00aea9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonwhois/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ def allow_trailing_comma_dict(regexes):
494494
known_abbreviations = precompile_regexes_dict(known_abbreviations, re.IGNORECASE)
495495

496496
duplicate_spaces = re.compile(" {2,}")
497-
non_name_characters = ''.join(char for char in map(chr, range(256)) if not char.isalpha())
497+
non_name_characters = [char for char in map(chr, range(256)) if not char.isalpha()]
498498
name_separators = re.compile(r'[, ]+')
499499
comma_without_space = re.compile(r',([a-z])', re.IGNORECASE)
500500

0 commit comments

Comments
 (0)