Repository navigation
Commit 2155c26
fix: remove the temporary dataset file when moving it into place fails
If os.replace raised (for example a permission error, or a directory already
at the dataset path), the completed temporary file was left in the cache
directory. Run the move inside the try and remove the temporary file in
finally, so it is cleaned up after any failure.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 1c8f5e9 commit 2155c26
2 files changed
Lines changed: 19 additions & 3 deletions
File tree
- src/bespokelabs/curator/request_processor
- tests/unittests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | | - | |
48 | | - | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
0 commit comments