From: Robert Leftwich Date: Sat, 26 Nov 2005 23:15:43 +0000 (+0000) Subject: Added some error checking to the command line processing in testbase X-Git-Tag: rel_0_1_0~298 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72858e47477184d7670e2fc6f23d5f1af5794304;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Added some error checking to the command line processing in testbase --- diff --git a/test/testbase.py b/test/testbase.py index c7564f883f..9561959c0d 100644 --- a/test/testbase.py +++ b/test/testbase.py @@ -132,8 +132,11 @@ class TTestSuite(unittest.TestSuite): return (exctype, excvalue, tb) unittest.TestLoader.suiteClass = TTestSuite - -(param, DBTYPE) = (sys.argv.pop(1), sys.argv.pop(1)) + +if len(sys.argv) == 3: + (param, DBTYPE) = (sys.argv.pop(1), sys.argv.pop(1)) +else: + (param, DBTYPE) = None, None if (param != '--db'): raise "--db param required"