Fix exception handling when both python-pysqlite2 and sqlite3 are installed.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 15 Nov 2010 15:30:36 +0000 (16:30 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 15 Nov 2010 15:30:36 +0000 (16:30 +0100)
buildfarm/sqldb.py

index 8c5330fc0bc742183bcf0910ecd0f35b1f5f3543..e0ef491cdcbc858c055e07ba4c17f2a8f5424055 100644 (file)
@@ -35,9 +35,9 @@ from buildfarm.hostdb import (
 
 import os
 try:
-    import sqlite3
-except ImportError:
     from pysqlite2 import dbapi2 as sqlite3
+except ImportError:
+    import sqlite3
 from storm.database import create_database
 from storm.locals import Bool, Desc, Int, Unicode, RawStr
 from storm.store import Store