Skip to content

Commit

Permalink
Fixed #15173 -- fixed the tests when run under pypy.
Browse files Browse the repository at this point in the history
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
alex committed Jan 27, 2011
1 parent 7505abf commit 7c0e405
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions django/db/backends/sqlite3/introspection.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ def get_relations(self, cursor, table_name):
table, column = [s.strip('"') for s in m.groups()] table, column = [s.strip('"') for s in m.groups()]


cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s", [table]) cursor.execute("SELECT sql FROM sqlite_master WHERE tbl_name = %s", [table])
result = cursor.fetchone() result = cursor.fetchall()[0]
if not result:
continue
other_table_results = result[0].strip() other_table_results = result[0].strip()
li, ri = other_table_results.index('('), other_table_results.rindex(')') li, ri = other_table_results.index('('), other_table_results.rindex(')')
other_table_results = other_table_results[li+1:ri] other_table_results = other_table_results[li+1:ri]
Expand Down

0 comments on commit 7c0e405

Please sign in to comment.