From: Mike Bayer Date: Sun, 5 Feb 2006 16:20:16 +0000 (+0000) Subject: now lets do that properly X-Git-Tag: rel_0_1_0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7065eb46c54a3fb6155d69c5e4933040da1bfe45;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git now lets do that properly --- diff --git a/lib/sqlalchemy/databases/sqlite.py b/lib/sqlalchemy/databases/sqlite.py index 1958118b7d..83fb00205f 100644 --- a/lib/sqlalchemy/databases/sqlite.py +++ b/lib/sqlalchemy/databases/sqlite.py @@ -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):