[SQL-CVS] SQLObject/tests SQLObjectTest.py,1.15,1.16
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: <ian...@us...> - 2003-09-26 07:11:51
|
Update of /cvsroot/sqlobject/SQLObject/tests In directory sc8-pr-cvs1:/tmp/cvs-serv1794/tests Modified Files: SQLObjectTest.py Log Message: Added a slightly better error message Index: SQLObjectTest.py =================================================================== RCS file: /cvsroot/sqlobject/SQLObject/tests/SQLObjectTest.py,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SQLObjectTest.py 7 Sep 2003 23:36:08 -0000 1.15 --- SQLObjectTest.py 26 Sep 2003 07:11:46 -0000 1.16 *************** *** 132,136 **** def setDatabaseType(t): global __connection__ ! conn = globals()[t + "Connection"]() SQLObjectTest.databaseName = t __connection__ = conn --- 132,139 ---- def setDatabaseType(t): global __connection__ ! try: ! conn = globals()[t + "Connection"]() ! except KeyError: ! raise KeyError, 'No connection by the type %s is known' % t SQLObjectTest.databaseName = t __connection__ = conn |