From 10f3617b5eeeba2b6ed8bd76ee6b9fd2641417f5 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 20 Jan 2016 08:51:15 +0100 Subject: [PATCH] tests: Only pass DISPLAY if it exists in the env. --- tests/integration/testprocess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 80da2a10d..1a7ce3e28 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -244,7 +244,8 @@ class Process(QObject): procenv = QProcessEnvironment() for k, v in env.items(): procenv.insert(k, v) - procenv.insert('DISPLAY', os.environ['DISPLAY']) + if 'DISPLAY' in os.environ: + procenv.insert('DISPLAY', os.environ['DISPLAY']) self.proc.readyRead.connect(self.read_log) self.proc.setProcessEnvironment(procenv)