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

Re: CVS update: MODIFIED: cmdline, commit_tests.py, svnadmin_tests.py ...

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-08-27 23:09:04 CEST

On Mon, Aug 27, 2001 at 08:29:05PM -0000, cmpilato@tigris.org wrote:
>...
> --- basic_tests.py 2001/08/24 17:05:58 1.13
> +++ basic_tests.py 2001/08/27 20:29:05 1.14
> @@ -17,10 +17,16 @@
> ######################################################################
>
> # General modules
> -import shutil, string, sys, re, os.path
> +import shutil, string, sys, re, os.path, traceback
>
> # The `svntest' module
> -import svntest
> +try:
> + import svntest
> +except SyntaxError:
> + print "<<< Please make sure you have Python 2.1 or better! >>>"
> + traceback.print_exc()
> + raise SystemExit

In Python, a plain "raise" statement will re-raise the original error. That
could simplify the text, and eliminate the need for the traceback module:

  try:
    import svntest
  except SyntaxError:
    print "..."
    raise

Your solution works fine... this has been a Python Hint Interruption. We
will now return to our regularly scheduled program...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:37 2006

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.