diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-03-10 23:13:34 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-03-10 23:13:34 +0100 |
commit | eddd80e2fbb3db213e4a5713174791cce7de4384 (patch) | |
tree | c3d12006d8a4caa2013e3f89a180e297d6b4d4e2 /src/monitor.py | |
parent | list icc profiles (diff) | |
download | blueshift-eddd80e2fbb3db213e4a5713174791cce7de4384.tar.gz blueshift-eddd80e2fbb3db213e4a5713174791cce7de4384.tar.bz2 blueshift-eddd80e2fbb3db213e4a5713174791cce7de4384.tar.xz |
raise exception if blueshift_idcrtc fails
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/monitor.py')
-rw-r--r-- | src/monitor.py | 4 |
1 files changed, 4 insertions, 0 deletions
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: |