summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-29 10:50:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-31 10:32:45 +0100
commit54c92196b8bd98ffe77e96816031d706f7c58341 (patch)
treef34385d3991344b6ca5cc254a77ba2e6b671a671 /meta/lib
parente384d9ba0c4a3335575a766a82ed79201d794b11 (diff)
downloadpoky-54c92196b8bd98ffe77e96816031d706f7c58341.tar.gz
sshcontrol: Use os.environ.copy() instead of copy.copy()
os.environ is special and copy.copy() doesn't do what we'd expect, changes in the child object change the parent. copy.deepcopy() is also known to have issues with it. Use the dedicated .copy() method which will not influence the parent. This fixes selftest failures where the DISPLAY variable disappears. (From OE-Core rev: 638cd44cc9a9eb435350aac7e8eeec585d74f8db) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 4f8d3d2c98..6ed48badc8 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -10,7 +10,6 @@ import subprocess
10import time 10import time
11import os 11import os
12import select 12import select
13import copy
14 13
15 14
16class SSHProcess(object): 15class SSHProcess(object):
@@ -33,7 +32,7 @@ class SSHProcess(object):
33 self.logfile = None 32 self.logfile = None
34 33
35 # Unset DISPLAY which means we won't trigger SSH_ASKPASS 34 # Unset DISPLAY which means we won't trigger SSH_ASKPASS
36 env = copy.copy(os.environ) 35 env = os.environ.copy()
37 if "DISPLAY" in env: 36 if "DISPLAY" in env:
38 del env['DISPLAY'] 37 del env['DISPLAY']
39 self.options['env'] = env 38 self.options['env'] = env