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

Re: svn commit: rev 5014 - trunk/subversion/tests/clients/cmdline/svntest

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2003-02-22 19:40:16 CET

brane@tigris.org writes:

> Modified: trunk/subversion/tests/clients/cmdline/svntest/testcase.py
> ==============================================================================
> --- trunk/subversion/tests/clients/cmdline/svntest/testcase.py (original)
> +++ trunk/subversion/tests/clients/cmdline/svntest/testcase.py Fri Feb 21 22:06:20 2003
> @@ -71,6 +71,10 @@
> self.pred.list_mode(),
> self.pred.func.__doc__)
>
> + def _print_name(self):
> + print os.path.basename(sys.argv[0]), \
> + str(self.index) + ":", self.pred.func.__doc__
> +
> def run(self, args):
> if self.pred.cond:
> error = 0
> @@ -84,16 +88,17 @@
> except KeyboardInterrupt:
> print "Interrupted"
> sys.exit(0)
> - except SystemExit:
> - print "Got a SystemExit exception, exiting."
> - sys.exit(0)
> + except SystemExit, ex:
> + print "Caught SystemExit(%d), skipping cleanup" % ex.code
> + print ('PASS: ', 'FAIL: ')[ex.code != 0],
                                                   ^
> + self._print_name()
> + raise

What is the trailing comma for? Seems harmless enough with print able
to deal with sequences (which aren't strings), but it's not clear to
me why it needs to be there.

-- 
Daniel Rall <dlr@finemaltcoding.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 22 19:40:45 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.