summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/sshcontrol.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-23 16:51:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-25 14:41:42 +0100
commit672517e0718c163511ba3640a65215d9e46df9d9 (patch)
treed919e700e34d9ad584876e0cea44875baf655e00 /meta/lib/oeqa/utils/sshcontrol.py
parent98b5364baea1da08ded1e5b9b2fb553ec34322d3 (diff)
downloadpoky-672517e0718c163511ba3640a65215d9e46df9d9.tar.gz
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>
Diffstat (limited to 'meta/lib/oeqa/utils/sshcontrol.py')
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 1c81795a87..4f8d3d2c98 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -10,6 +10,7 @@ import subprocess
10import time 10import time
11import os 11import os
12import select 12import select
13import copy
13 14
14 15
15class SSHProcess(object): 16class SSHProcess(object):
@@ -31,6 +32,12 @@ class SSHProcess(object):
31 self.starttime = None 32 self.starttime = None
32 self.logfile = None 33 self.logfile = None
33 34
35 # Unset DISPLAY which means we won't trigger SSH_ASKPASS
36 env = copy.copy(os.environ)
37 if "DISPLAY" in env:
38 del env['DISPLAY']
39 self.options['env'] = env
40
34 def log(self, msg): 41 def log(self, msg):
35 if self.logfile: 42 if self.logfile:
36 with open(self.logfile, "a") as f: 43 with open(self.logfile, "a") as f: