]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
now lets do that properly
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 5 Feb 2006 16:20:16 +0000 (16:20 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 5 Feb 2006 16:20:16 +0000 (16:20 +0000)
lib/sqlalchemy/databases/sqlite.py

index 1958118b7d11e60079dbc3058f2593424135edba..83fb00205f7cc3da61ce8bee88876bae66784015 100644 (file)
@@ -119,6 +119,8 @@ def descriptor():
     
 class SQLiteSQLEngine(ansisql.ANSISQLEngine):
     def __init__(self, opts, **params):
+        if sqlite is None:
+            raise "Couldn't import pysqlite2"
         self.filename = opts.pop('filename', ':memory:')
         self.opts = opts or {}
         params['poolclass'] = sqlalchemy.pool.SingletonThreadPool
@@ -144,8 +146,6 @@ class SQLiteSQLEngine(ansisql.ANSISQLEngine):
         return SQLiteCompiler(self, statement, bindparams, **kwargs)
 
     def dbapi(self):
-        if sqlite is None:
-            raise "Couldn't import pysqlite2"
         return sqlite
 
     def schemagenerator(self, proxy, **params):