summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-03-10 23:13:34 +0100
committerMattias Andrée <maandree@operamail.com>2014-03-10 23:13:34 +0100
commiteddd80e2fbb3db213e4a5713174791cce7de4384 (patch)
treec3d12006d8a4caa2013e3f89a180e297d6b4d4e2
parentlist icc profiles (diff)
downloadblueshift-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>
-rw-r--r--src/monitor.py4
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: