zhechen-cs opened a new pull request, #2203: URL: https://github.com/apache/libcloud/pull/2203
### Description Release the thread lock when `LockLocalStorage` cannot acquire its IPC lock. A failed `__enter__` never reaches `__exit__`, so the previous code left the thread lock held after a timeout, acquisition error or interruption, preventing reuse of the same lock object. Regression coverage verifies cleanup and successful reuse after each failure, while preserving the original exceptions. This is independent of the lock-file cleanup in #2172. Fixes https://github.com/apache/libcloud/issues/2202 ### Status Ready for review. ### Validation - Local and base storage tests: 33 passed, 3 subtests passed (Python 3.12). - All three regression cases fail on unmodified production code because the thread lock stays held. - Black, isort, flake8, pylint and `git diff --check` pass for the changed files. - Live cloud integration tests were not run. ### Checklist - [x] Code linting - [ ] Documentation (no public API change) - [x] Tests - [ ] ICLA (small bug fix) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
