diff --git a/rtv/utils.py b/rtv/utils.py index ca2fec4..6a50ca1 100644 --- a/rtv/utils.py +++ b/rtv/utils.py @@ -3,14 +3,10 @@ import sys import curses import time import threading -import subprocess from curses import textpad, ascii from contextlib import contextmanager -from functools import partial -from types import MethodType from six.moves import configparser -from six import create_bound_method from .errors import EscapePressed @@ -83,17 +79,6 @@ def load_config(): return defaults -def hide_stderr(): - """ - Redirect all stderr output to null. This is a hack to stop the webbrowser - from spewing errors in firefox. - """ - - # http://www.thecodingforums.com/threads/how-to-change-redirect-stderr.355342/#post-1868822 - sys.stderr.flush() - err = open(os.devnull, 'ab+', 0) - os.dup2(err.fileno(), sys.stderr.fileno()) - def text_input(window): """ Transform a window into a text box that will accept user input and loop @@ -276,14 +261,11 @@ def curses_session(): # Hide blinking cursor curses.curs_set(0) - # hide_stderr() - yield stdscr finally: - if stdscr is not None: stdscr.keypad(0) curses.echo() curses.nocbreak() - curses.endwin() + curses.endwin() \ No newline at end of file