From 6f0773df3152b312a6cd9c6f35d337af1ac0ef8c Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Thu, 3 Dec 2015 22:16:29 -0800 Subject: [PATCH] Fixed os.terminate() error when the process has already finished. --- rtv/terminal.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rtv/terminal.py b/rtv/terminal.py index 377a9e0..a20cdd3 100644 --- a/rtv/terminal.py +++ b/rtv/terminal.py @@ -313,7 +313,10 @@ class Terminal(object): # Can't check the loader exception because the oauth module # supersedes this loader and we need to always kill the # process if escape is pressed - p.terminate() + try: + p.terminate() + except OSError: + pass else: with self.suspend(): webbrowser.open_new_tab(url)