3954af8 Catch termios errors on non-terminal

Authored and Committed by lruzicka 6 months ago
    Catch termios errors on non-terminal
    
    The application uses termios to flush unwanted input that might
    have happened before the application got ready to accept
    users' choices. However, termios calls would end up with
    the error 25, if the application was not run in the terminal
    but in an IDE or similar tool.
    
    Previously, we have created an exception for this, but the
    caught error was an incorrect one, so termios would still
    complain.
    
    This should be the correct solution to catch the error.
    I tested it in IDLE and in Spyder and it works as expected
    by skipping the termios calls if the application does not run
    in a terminal session.
    
    Fixes: https://pagure.io/fedora-easy-karma/issue/57
    
        
file modified
+2 -2