From 9d49115e45266da435a69fc23c05d6f502b65eee Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 25 Nov 2011 16:01:07 +0000 Subject: [PATCH] -pyexpect fix --- contrib/gnunet_pyexpect.py.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/gnunet_pyexpect.py.in b/contrib/gnunet_pyexpect.py.in index 15d19fe5a..9e5c83fa3 100644 --- a/contrib/gnunet_pyexpect.py.in +++ b/contrib/gnunet_pyexpect.py.in @@ -31,7 +31,12 @@ class pexpect (object): super (pexpect, self).__init__ () def spawn (self, stdin, arglist, *pargs, **kwargs): - self.proc = subprocess.Popen (arglist, *pargs, **kwargs) + env = kwargs.pop ('env', None) + if env is None: + env = os.environ.copy () + # This messes up some testcases, disable log redirection + env.pop ('GNUNET_FORCE_LOGFILE', None) + self.proc = subprocess.Popen (arglist, *pargs, env=env, **kwargs) if self.proc is None: print ("Failed to spawn a process {0}".format (arglist)) sys.exit (1) -- 2.25.1