From af3bfefc622031786a4f9d9befd8b1d1da8a8922 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Wed, 12 Jan 2011 17:17:33 -0500 Subject: - fix reflection of unknown types with arguments, NullType() accepts no arguments. --- lib/sqlalchemy/dialects/sqlite/base.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/sqlalchemy/dialects/sqlite/base.py') diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index ac0fde846..2fadda68c 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -525,13 +525,13 @@ class SQLiteDialect(default.DefaultDialect): args = '' try: coltype = self.ischema_names[coltype] + if args is not None: + args = re.findall(r'(\d+)', args) + coltype = coltype(*[int(a) for a in args]) except KeyError: util.warn("Did not recognize type '%s' of column '%s'" % (coltype, name)) - coltype = sqltypes.NullType - if args is not None: - args = re.findall(r'(\d+)', args) - coltype = coltype(*[int(a) for a in args]) + coltype = sqltypes.NullType() columns.append({ 'name' : name, -- cgit v1.2.1