diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-11-25 16:01:07 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-11-25 16:01:07 +0000 |
commit | 9d49115e45266da435a69fc23c05d6f502b65eee (patch) | |
tree | ca78ce0aaa5986f12b224e99359ec8435faace71 /contrib | |
parent | 4eef01098baccf1135faa37a148035a5a42bc774 (diff) | |
download | gnunet-9d49115e45266da435a69fc23c05d6f502b65eee.tar.gz gnunet-9d49115e45266da435a69fc23c05d6f502b65eee.zip |
-pyexpect fix
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gnunet_pyexpect.py.in | 7 |
1 files changed, 6 insertions, 1 deletions
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): | |||
31 | super (pexpect, self).__init__ () | 31 | super (pexpect, self).__init__ () |
32 | 32 | ||
33 | def spawn (self, stdin, arglist, *pargs, **kwargs): | 33 | def spawn (self, stdin, arglist, *pargs, **kwargs): |
34 | self.proc = subprocess.Popen (arglist, *pargs, **kwargs) | 34 | env = kwargs.pop ('env', None) |
35 | if env is None: | ||
36 | env = os.environ.copy () | ||
37 | # This messes up some testcases, disable log redirection | ||
38 | env.pop ('GNUNET_FORCE_LOGFILE', None) | ||
39 | self.proc = subprocess.Popen (arglist, *pargs, env=env, **kwargs) | ||
35 | if self.proc is None: | 40 | if self.proc is None: |
36 | print ("Failed to spawn a process {0}".format (arglist)) | 41 | print ("Failed to spawn a process {0}".format (arglist)) |
37 | sys.exit (1) | 42 | sys.exit (1) |