This is a development version (9.18.0.dev) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.18.0.dev / IPython / core / history / catch_corrupt_db

function

IPython.core.history:catch_corrupt_db

source: /IPython/core/history.py:173

Signature

def catch_corrupt_db(f: t.Callable[_P, _R]) → t.Callable[_P, _R]

Summary

A decorator which wraps HistoryAccessor method calls to catch errors from a corrupt SQLite database, move the old database out of the way, and create a new one.

Extended Summary

We avoid clobbering larger databases because this may be triggered due to filesystem issues, not just a corrupt file.

Aliases

  • IPython.core.history.catch_corrupt_db