geotom / free.dm-Common

Core framework of free.dm
MIT License
1 stars 1 forks source link

Create a safe_open context manager that replaces the default open #15

Open geotom opened 5 years ago

geotom commented 5 years ago

This context manager should write to a temporary file and only if this works without an error, then we can replace the target file by the temporary file. This way we can assure we do never leave corrupted files.