1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 16:59:22 +00:00

oeqa/sshcontrol: Ensure we don't trigger ssh-askpass

If DISPLAY is set, ssh-askpass can be triggered which is not what
we want in the middle of sanity tests. We can disable this by
unsetting DISPLAY.

(From OE-Core rev: 085681a1418a29a8331cdde0f477f4e223de84be)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Richard Purdie
2015-07-23 16:51:27 +01:00
parent 98b5364bae
commit 672517e071
+7
View File
@@ -10,6 +10,7 @@ import subprocess
import time
import os
import select
import copy
class SSHProcess(object):
@@ -31,6 +32,12 @@ class SSHProcess(object):
self.starttime = None
self.logfile = None
# Unset DISPLAY which means we won't trigger SSH_ASKPASS
env = copy.copy(os.environ)
if "DISPLAY" in env:
del env['DISPLAY']
self.options['env'] = env
def log(self, msg):
if self.logfile:
with open(self.logfile, "a") as f: