Skip to content

Fix pylint W0719: replace broad Exception with ValueError/RuntimeError#793

Merged
Shrews merged 1 commit intoansible:develfrom
Shrews:fix-pylint-w0719-broad-exception-raised
Mar 10, 2026
Merged

Fix pylint W0719: replace broad Exception with ValueError/RuntimeError#793
Shrews merged 1 commit intoansible:develfrom
Shrews:fix-pylint-w0719-broad-exception-raised

Conversation

@Shrews
Copy link
Contributor

@Shrews Shrews commented Mar 10, 2026

  • Enable W0719 (broad-exception-raised) in pyproject.toml
  • utils.py: raise ValueError for invalid path/usage in copy_directory and copy_file
  • test/conftest.py: raise RuntimeError for image cleanup failure in delete_image
  • test/unit/test_utils.py: expect ValueError in tests for copy_file/copy_directory

Assisted-by: Cursor

- Enable W0719 (broad-exception-raised) in pyproject.toml
- utils.py: raise ValueError for invalid path/usage in copy_directory and copy_file
- test/conftest.py: raise RuntimeError for image cleanup failure in delete_image
- test/unit/test_utils.py: expect ValueError in tests for copy_file/copy_directory
@github-actions github-actions bot added the needs_triage New item that needs to be triaged label Mar 10, 2026
@Shrews Shrews marked this pull request as ready for review March 10, 2026 17:10
@Shrews Shrews requested a review from a team as a code owner March 10, 2026 17:10
@Shrews Shrews merged commit 5c5719d into ansible:devel Mar 10, 2026
18 checks passed
@Shrews Shrews deleted the fix-pylint-w0719-broad-exception-raised branch March 10, 2026 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs_triage New item that needs to be triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants