bjarneo / Pytify

A CLI application for controlling Spotify
MIT License
743 stars 40 forks source link

Handle EOFError of prompt in interaction() method in class App #73

Closed bharath-123 closed 4 years ago

bharath-123 commented 4 years ago

It is better to handle the EOFError(triggered when we hit ctrl + D) in the interaction() method rather than handling it outside in name == "main". This is to enhance readability of code. Since a KeyBoardError or EOFError are associated with each new prompt session(a new prompt session is defined after each iteration of the while loop), it makes sense to move the error handling of EOFError to interaction method.

bharath-123 commented 4 years ago

I am sorry for missing this out in my previous commit.

bjarneo commented 4 years ago

No worries!