"Barry Scott" <barry.alan.scott@ntlworld.com> writes:
> > Running all tests in log_tests.py... File "log_tests.py", line 283
> > msg += line
> > ^
> > SyntaxError: invalid syntax
> > FAILED
> > --- at least one test FAILED, check tests.log.
>
> += first worked in Python 2.1 I think. 2.1.1 is the best stable python
> at the moment.
>
> You might want to test the python version so that an error message
> about old python version can be output.
>
> Code like:
>
> import sys
> if sys.hexvesion < 0x2010000:
> print 'Upgrade Python to version 2.1 or better.'
>
> This will work for 1.5.2 and later as a detector. The nicer sys.version_info
> is not available in 1.5.2.
>
> Further on RedHat python will be 1.5.2 where as if python2 exists it will
> be 2.0 or better. You will need to run python2 on RedHat.
All of our python test scripts are doing this:
# The `svntest' module
try:
import svntest
except SyntaxError:
sys.stderr.write('[SKIPPED] ')
print "<<< Please make sure you have Python 2 or better! >>>"
traceback.print_exc(None,sys.stdout)
raise SystemExit
...is this not enough?
---------------------------------------------------------------------
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:49 2006