From eddd80e2fbb3db213e4a5713174791cce7de4384 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 10 Mar 2014 23:13:34 +0100 Subject: raise exception if blueshift_idcrtc fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/monitor.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/monitor.py') diff --git a/src/monitor.py b/src/monitor.py index d2a4eb7..0e409f0 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -422,6 +422,10 @@ def list_screens(): ''' process = Popen([LIBEXECDIR + "/blueshift_idcrtc"], stdout = PIPE) lines = process.communicate()[0].decode('utf-8', 'error').split('\n') + while process.returncode is None: + process.wait() + if process.returncode != 0: + raise Exception('blueshift_idcrtc exited with value %i' % process.returncode) lines = [line.strip() for line in lines] screens, screen_i, screen, output = None, None, None, None for line in lines: -- cgit v1.2.3-70-g09d2