ipython/ipython — pull request #2389 by takluyver (2012-09-06 23:26:33+00:00)
Title: Catch sqlite DatabaseErrors in more places when reading the history database

It seems sqlite can encounter corruption and throw an error when reading the database, although it has connected successfully. This borrows the move-and-recreate machinery we already had on connecting to the database.

I can't test the actual bug, because I don't have a suitably corrupt file, but I've checked with a file it can't connect to that it still moves and recreates correctly.

Closes gh-2097