You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2012/03/22 17:45:30 UTC
svn commit: r1303883 -
/subversion/trunk/subversion/tests/cmdline/svntest/main.py
Author: gstein
Date: Thu Mar 22 16:45:30 2012
New Revision: 1303883
URL: http://svn.apache.org/viewvc?rev=1303883&view=rev
Log:
Followup to 1303727: use .rstrip() rather than whacking a single '\n'
character off the end. This approach can also handle '\r\n'. Trailing
whitespace happens to get killed, but no bigg.
* subversion/tests/cmdline/svntest/main.py:
(run_command_stdin): strip all trailing whitespace on some lines
that we send to the logger
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1303883&r1=1303882&r2=1303883&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Thu Mar 22 16:45:30 2012
@@ -515,13 +515,13 @@ def run_command_stdin(command, error_exp
stop = time.time()
logger.info('<TIME = %.6f>' % (stop - start))
for x in stdout_lines:
- logger.info(x[:-1])
+ logger.info(x.rstrip())
for x in stderr_lines:
- logger.info(x[:-1])
+ logger.info(x.rstrip())
if (not error_expected) and ((stderr_lines) or (exit_code != 0)):
for x in stderr_lines:
- logger.warning(x[:-1])
+ logger.warning(x.rstrip())
raise Failure
return exit_code, \
Re: svn commit: r1303883 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py
Posted by Greg Stein <gs...@gmail.com>.
On Thu, Mar 22, 2012 at 13:10, C. Michael Pilato <cm...@collab.net> wrote:
> On 03/22/2012 12:45 PM, gstein@apache.org wrote:
>> Author: gstein
>> Date: Thu Mar 22 16:45:30 2012
>> New Revision: 1303883
>>
>> URL: http://svn.apache.org/viewvc?rev=1303883&view=rev
>> Log:
>> Followup to 1303727: use .rstrip() rather than whacking a single '\n'
>> character off the end. This approach can also handle '\r\n'. Trailing
>> whitespace happens to get killed, but no bigg.
>
> You beat me to this change. But for the sake of precision, why not go ahead
> and use ".rstrip('\r\n')" ? Is the extra precision just disinteresting in
> this context?
Correct. These are lines that are going into the logger (stdout,
tests.log, whatever). No need for any trailing whitespace.
Cheers,
-g
Re: svn commit: r1303883 - /subversion/trunk/subversion/tests/cmdline/svntest/main.py
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 03/22/2012 12:45 PM, gstein@apache.org wrote:
> Author: gstein
> Date: Thu Mar 22 16:45:30 2012
> New Revision: 1303883
>
> URL: http://svn.apache.org/viewvc?rev=1303883&view=rev
> Log:
> Followup to 1303727: use .rstrip() rather than whacking a single '\n'
> character off the end. This approach can also handle '\r\n'. Trailing
> whitespace happens to get killed, but no bigg.
You beat me to this change. But for the sake of precision, why not go ahead
and use ".rstrip('\r\n')" ? Is the extra precision just disinteresting in
this context?
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand