From 632a8568bb7716318dcc7596e2fe0c00435bd29b Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Mon, 14 May 2012 14:26:34 -0500 Subject: [PATCH] sys.exit(1) of error on run_system_tests --- VERSION | 2 +- gluon/widget.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/VERSION b/VERSION index 2af211eb..8773ae90 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-05-11 21:56:14) dev +Version 2.00.0 (2012-05-14 14:26:04) dev diff --git a/gluon/widget.py b/gluon/widget.py index 85ce0a2e..4b5ab186 100644 --- a/gluon/widget.py +++ b/gluon/widget.py @@ -62,15 +62,17 @@ def run_system_tests(): if major_version == 2: if minor_version in (5, 6): print "Python 2.5 or 2.6" - os.system("PYTHONPATH=. unit2 -v gluon.tests") + ret = os.system("PYTHONPATH=. unit2 -v gluon.tests") elif minor_version in (7,): print "Python 2.7" - os.system("PYTHONPATH=. python -m unittest -v gluon.tests") + ret = os.system("PYTHONPATH=. python -m unittest -v gluon.tests") else: print "unknown python 2.x version" + ret = 256 else: print "Only Python 2.x supported." - + ret = 256 + sys.exit(ret or 1) class IO(object): """ """ @@ -789,7 +791,6 @@ def console(): if options.run_system_tests: run_system_tests() - sys.exit(0) if options.quiet: capture = cStringIO.StringIO()