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!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.