[Python-modules-commits] [python-asyncssh] 04/05: Fix FTBFS in agent-related test due to environment-mangling
Vincent Bernat
bernat at moszumanska.debian.org
Sat Jan 21 20:13:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
bernat pushed a commit to branch master
in repository python-asyncssh.
commit 4446e389bf65a5f76927be8cf51378082f239ec7
Author: Vincent Bernat <vincent at bernat.im>
Date: Sat Jan 21 21:01:38 2017 +0100
Fix FTBFS in agent-related test due to environment-mangling
Another test was cleaning up the environment too much.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851020
See: https://github.com/ronf/asyncssh/issues/77
See: https://github.com/ronf/asyncssh/commit/6188a4cfe367fa083070bb0edc5cca87c5661bd2
---
tests/server.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests/server.py b/tests/server.py
index c2dc356..7de577c 100644
--- a/tests/server.py
+++ b/tests/server.py
@@ -133,7 +133,12 @@ class ServerTestCase(AsyncTestCase):
cls._server_port))
run('cat skey.pub >> .ssh/known_hosts')
- os.environ = {'LOGNAME': 'guest', 'HOME': '.'}
+ os.environ['LOGNAME'] = 'guest'
+ os.environ['HOME'] = '.'
+ if 'DISPLAY' in os.environ:
+ del os.environ['DISPLAY']
+ if 'XAUTHORITY' in os.environ:
+ del os.environ['XAUTHORITY']
try:
output = run('ssh-agent -a agent 2>/dev/null')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-asyncssh.git
More information about the Python-modules-commits
mailing list