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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
import time
import os
import select
+import copy
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: