On 2011-04-12 16:35, Stefan Manegold wrote: > Changeset: 5955c5c564ee for MonetDB > URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5955c5c564ee > Modified Files: > testing/Mtest.py.in > Branch: Apr2011 > Log Message: > > make sure subprocess.Popen() indeed catches stderr as (supposely) intended
I don't think that was intended (i.e., I don't think that was what I
intended ;-). With your change, if the process produces error output,
it is now discarded. Before it would have been sent to Mtest's stderr.
But it's not a big deal. The error output of these processes are
probably not very interesting.
>
> diffs (21 lines):
>
> diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
> --- a/testing/Mtest.py.in
> +++ b/testing/Mtest.py.in
> @@ -2744,7 +2744,7 @@
> r = re.compile('^Microsoft Windows (.*)\[Version
> ([0-9]+\.[0-9]+)([^\[0-9].*)\]$')
> if verbose:
> print 'starting process "cmd" "/c" "ver" (inpipe,outpipe)\n'
> - proc = subprocess.Popen('cmd /c ver', stdin = subprocess.PIPE, stdout =
> subprocess.PIPE, universal_newlines = True)
> + proc = subprocess.Popen('cmd /c ver', stdin = subprocess.PIPE, stdout =
> subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
> qOut, qErr = proc.communicate()
> if verbose:
> print 'process exited "cmd" "/c" "ver" (%s)\n' % proc.returncode
> @@ -2879,7 +2879,7 @@
> try:
> if verbose:
> print 'starting process "hg" "root" (inpipe,outpipe)\n'
> - proc = subprocess.Popen(['hg','root'], stdin = subprocess.PIPE, stdout =
> subprocess.PIPE, universal_newlines = True)
> + proc = subprocess.Popen(['hg','root'], stdin = subprocess.PIPE, stdout =
> subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True)
> out,err = proc.communicate()
> if verbose:
> print 'process exited "hg" "root" (%s)\n' % proc.returncode
> _______________________________________________
> Checkin-list mailing list
> [email protected]
> http://mail.monetdb.org/mailman/listinfo/checkin-list
--
Sjoerd Mullender
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
