tests: Only pass DISPLAY if it exists in the env.
This commit is contained in:
parent
037be96718
commit
10f3617b5e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user