What steps will reproduce the problem?
1. Create a new table, do not add any records
2. Call list_columns on the new table
What is the expected output? What do you see instead?
The expected output is the names of the columns in the table. Instead you
will get an AttributeError.
Traceback (most recent call last):
File "./test.py", line 66, in test_list_columns
res = db.list_columns(TEST_DB,TEST_TABLE)
File "/home/chooper/restful-sqlite/db.py", line 59, in list_columns
columns = c.keys()
AttributeError: 'NoneType' object has no attribute 'keys'
This is the result of fetchone() returning None. Instead of using the
sqlite3 Row obj to get column names we should probably query the schema
table instead.
Original issue reported on code.google.com by hoop...@gmail.com on 28 Dec 2009 at 5:34
Original issue reported on code.google.com by
hoop...@gmail.com
on 28 Dec 2009 at 5:34