Author: phd
Date: 2005-10-04 19:41:23 +0000 (Tue, 04 Oct 2005)
New Revision: 1076
Modified:
SQLObject/trunk/sqlobject/sqlite/__init__.py
Log:
Fixed bug 1311512: test PySQLite version 2 and version 1 if version 2 canot be found.
Modified: SQLObject/trunk/sqlobject/sqlite/__init__.py
===================================================================
--- SQLObject/trunk/sqlobject/sqlite/__init__.py 2005-10-04 18:45:20 UTC (rev 1075)
+++ SQLObject/trunk/sqlobject/sqlite/__init__.py 2005-10-04 19:41:23 UTC (rev 1076)
@@ -6,9 +6,12 @@
def isSupported():
try:
- import sqlite
+ from pysqlite2 import dbapi2 as sqlite
except ImportError:
- return False
+ try:
+ import sqlite
+ except ImportError:
+ return False
return True
registerConnection(['sqlite'], builder, isSupported)
|