Skip to content

Commit

Permalink
Fix non stopping spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRu committed May 3, 2020
1 parent 371ccae commit 0222316
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ def fetch_and_render(song_name, search_as_lyrics=False, is_retry=False):
title = get_page_title(page)
text = get_page_lyrics(page)

spinner_thread.stop()

if (title is None or text is None):
if is_retry:
raise ValueError(
"Genius has some troubles with this request for unknown reasons")
else:
return fetch_and_render(song_name, False, True)

spinner_thread.stop()

clear_terminal()
print_text(highlight_title(title) + "\n")
print_text(highlight_text(text) + "\n")
Expand Down

0 comments on commit 0222316

Please sign in to comment.