fixed unicode bs

This commit is contained in:
Hellow 2023-04-06 17:45:15 +02:00
parent 3acfa417e8
commit 1f0ff801d8

View File

@ -41,13 +41,15 @@ EXIT_COMMANDS = {
"quit" "quit"
} }
def print_cute_message(): def print_cute_message():
message = get_random_message() message = get_random_message()
try: try:
print(message) print(message)
except UnicodeDecodeError: except UnicodeEncodeError:
print((c for c in message if 0 < ord(c) < 127)) print((c for c in message if 0 < ord(c) < 127))
def cli(genre: str = None, download_all: bool = False): def cli(genre: str = None, download_all: bool = False):
def get_existing_genre() -> List[str]: def get_existing_genre() -> List[str]:
""" """
@ -75,7 +77,6 @@ def cli(genre: str = None, download_all: bool = False):
for i, genre_option in enumerate(existing_genres): for i, genre_option in enumerate(existing_genres):
print(f"{i + 1:0>2}: {genre_option}") print(f"{i + 1:0>2}: {genre_option}")
while True: while True:
genre = input("Id or new genre: ") genre = input("Id or new genre: ")