sqlite3 doesn't raise exception if database is not present/inaccessible

MRAB python at mrabarnett.plus.com
Sat Nov 13 12:19:36 EST 2010


On 13/11/2010 16:54, Ravi wrote:
> try this:
>
> import sqlite3
> con = sqlite3.connect("any string here")
>
> and there is no error reported. You will get an error you do some
> operations on the database which is confusing. I think sqlite3 should
> change this behavior.

That will open an existing database or create a new one. If it raised
an exception then how would you create a new database?



More information about the Python-list mailing list