Commit 7d61ac1
fix(python): avoid FileAlreadyExistsException in venv cleanup (#373)
## Summary
- Remove redundant `Files.createFile()` before `Files.write()` in
`PythonControllerVirtualEnv`
- `Files.write()` already creates the file if it doesn't exist
- The `createFile()` call caused `FileAlreadyExistsException` when a
previous analysis failed mid-way and left the `requirements.txt` behind
in `/tmp/trustify_da_env/`
## Test plan
- [x] All existing Python provider tests pass (35 tests, 0 failures)
- [x] Manual: trigger a Python analysis that fails (e.g. unresolvable
dep), then trigger another — should no longer throw
`FileAlreadyExistsException`
Implements [TC-3894](https://redhat.atlassian.net/browse/TC-3894)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Chao Wang <chaowan@redhat.com>1 parent 955d434 commit 7d61ac1
1 file changed
Lines changed: 0 additions & 1 deletion
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
| |||
0 commit comments