summaryrefslogtreecommitdiff
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:31:03 +0100
commit638cd44cc9a9eb435350aac7e8eeec585d74f8db (patch)
tree507e45cfc87525cf60a39b0c591d6ef8319beba8 /meta/lib
parentb411085fefc8582d24c172db5f6610705eb44c2f (diff)
downloadopenembedded-core-638cd44cc9a9eb435350aac7e8eeec585d74f8db.tar.gz
openembedded-core-638cd44cc9a9eb435350aac7e8eeec585d74f8db.tar.bz2
openembedded-core-638cd44cc9a9eb435350aac7e8eeec585d74f8db.zip
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. 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
import time
import os
import select
-import copy
class SSHProcess(object):
@@ -33,7 +32,7 @@ class SSHProcess(object):
self.logfile = None
# Unset DISPLAY which means we won't trigger SSH_ASKPASS
- env = copy.copy(os.environ)
+ env = os.environ.copy()
if "DISPLAY" in env:
del env['DISPLAY']
self.options['env'] = env