From 7c0e40534b7c2d8de9824a36824482d1067e195b Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 27 Jan 2011 00:00:32 +0000 Subject: [PATCH] Fixed #15173 -- fixed the tests when run under pypy. git-svn-id: http://code.djangoproject.com/svn/django/trunk@15333 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/sqlite3/introspection.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django/db/backends/sqlite3/introspection.py b/django/db/backends/sqlite3/introspection.py index 7f14941abf3..5ee7b64bcd5 100644 --- a/django/db/backends/sqlite3/introspection.py +++ b/django/db/backends/sqlite3/introspection.py @@ -85,9 +85,7 @@ class DatabaseIntrospection(BaseDatabaseIntrospection): table, column = [s.strip('"') for s in m.groups()] cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s", [table]) - result = cursor.fetchone() - if not result: - continue + result = cursor.fetchall()[0] other_table_results = result[0].strip() li, ri = other_table_results.index('('), other_table_results.rindex(')') other_table_results = other_table_results[li+1:ri]