• Kipp Cannon's avatar
    dbtables: implement working copy mechanism as context manager · 621c98ad
    Kipp Cannon authored
    - removes the need to install a hook into the NamedTemporaryFile instance to delete the corresponding -journal file in the event of program termination.  clean-up is the responsibility of the context manager.
    - backwards compatibility wrappers are provided
    - a small change in calling code is, however, required:  in all calling codes, much change connect(tmpname) to connect(str(tmpname)).  this can be done in advance of the python-ligo-lw release.
    - fixes issue #!14
dbtables.py 35.4 KB