justinsalamon / scaper

A library for soundscape synthesis and augmentation
BSD 3-Clause "New" or "Revised" License
384 stars 56 forks source link

tmpfiles don't close when an exception is raised #50

Closed beasteers closed 5 years ago

beasteers commented 5 years ago

If an exception is raised before _close_temp_files exits, the files won't be deleted, so to fix that, I propose catching the error, closing the files, then re-raising the error.

justinsalamon commented 5 years ago

Yes, this makes sense, I'll review the PR.

justinsalamon commented 5 years ago

Fixed via #49