You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2008/09/18 18:57:18 UTC

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

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,  <ar...@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@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org