[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r33166 - trunk/build/generator/util

From: Greg Stein <gstein_at_gmail.com>
Date: Thu, 18 Sep 2008 11:57:18 -0700

The assert statements should not have parens. assert is a statement,
not a function.

(yes, I realize that the parens existed before your change... just
noting the in-correctness)

On Thu, Sep 18, 2008 at 11:14 AM, <arfrever_at_tigris.org> wrote:
> Author: arfrever
> Date: Thu Sep 18 11:14:32 2008
> New Revision: 33166
>
> Log:
> * build/generator/util/executable.py
> (output): Delete code specific to Python 1.*.
>
> Modified:
> trunk/build/generator/util/executable.py
>
> Modified: trunk/build/generator/util/executable.py
> URL: http://svn.collab.net/viewvc/svn/trunk/build/generator/util/executable.py?pathrev=33166&r1=33165&r2=33166
> ==============================================================================
> --- trunk/build/generator/util/executable.py Thu Sep 18 10:50:30 2008 (r33165)
> +++ trunk/build/generator/util/executable.py Thu Sep 18 11:14:32 2008 (r33166)
> @@ -23,20 +23,8 @@ def find(file, dirs=None):
>
> def output(cmd, strip=None):
> """Run a command and collect all output"""
> - try:
> - # Python 2.x
> - stdin, stdout = os.popen4(cmd)
> - assert(not stdin.close())
> - except AttributeError:
> - try:
> - # Python 1.x on Unix
> - import posix
> - stdout = posix.popen('%s 2>&1' % cmd)
> - except ImportError:
> - # Python 1.x on Windows (no cygwin)
> - # There's no easy way to collect output from stderr, so we'll
> - # just collect stdout.
> - stdout = os.popen(cmd)
> + stdin, stdout = os.popen4(cmd)
> + assert(not stdin.close())
> output = stdout.read()
> assert(not stdout.close())
> if strip:
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe_at_subversion.tigris.org
> For additional commands, e-mail: svn-help_at_subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-09-18 20:57:32 CEST

This is an archived mail posted to the Subversion Dev mailing list.