Verifying a database.
"Colin Barnette" <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
Hello, I'm writing a sqlite database accessprogram and I am wondering
how I might be able to verify that a specified file by the user really
is a sqlite database.
I tried:
try:
dbcon = sqlite.connect(self.dbpath[0])
db = dbcon.cursor()
except:
print "Database Open Error."
but, it seems that even if the file is a .jpg or .py it still makes
the connection.
Any help would be greatly appreciated!