Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unreachable exception handling #855

Conversation

mfocko
Copy link
Member

@mfocko mfocko commented Sep 3, 2024

Remove the unreachable ‹except› block. Since the ‹collaborators› is populated from a helper method that can produce only exceptions that are wrapped in the ogr's exceptions (handled by the metaclass), hence the ‹github.GithubException› cannot be raised.

Fixes #760

@mfocko mfocko self-assigned this Sep 3, 2024
Copy link
Contributor

@mfocko mfocko added the mergeit When set, zuul wil gate and merge the PR. label Sep 3, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/526e42d4c88842e2b41cecec02c4de72

✔️ pre-commit SUCCESS in 2m 30s

Copy link
Contributor

Pull request merge failed: Changes must be made through the merge queue

@mfocko mfocko added this pull request to the merge queue Sep 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 3, 2024
Copy link
Contributor

@mfocko mfocko added this pull request to the merge queue Sep 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Sep 4, 2024
mfocko and others added 3 commits September 4, 2024 21:00
Remove the unreachable ‹except› block. Since the ‹collaborators› is
populated from a helper method that can produce only exceptions that
are wrapped in the ogr's exceptions (handled by the metaclass), hence
the ‹github.GithubException› cannot be raised.

Fixes packit#760

Signed-off-by: Matej Focko <mfocko@redhat.com>
updates:
- [github.com/psf/black: 24.2.0 → 24.8.0](psf/black@24.2.0...24.8.0)
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.11.2](pre-commit/mirrors-mypy@v1.8.0...v1.11.2)
- [github.com/teemtee/tmt.git: 1.31.0 → 1.35.0](https://github.com/teemtee/tmt.git/compare/1.31.0...1.35.0)
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.6.3](astral-sh/ruff-pre-commit@v0.2.2...v0.6.3)
- [github.com/python-jsonschema/check-jsonschema: 0.28.0 → 0.29.2](python-jsonschema/check-jsonschema@0.28.0...0.29.2)

(cherry picked from commit 255093d)

Closes packit#847 (by superseding)

Signed-off-by: Matej Focko <mfocko@redhat.com>
Signed-off-by: Matej Focko <mfocko@redhat.com>
@mfocko mfocko force-pushed the fix/remove-redundant-try-catch branch from f1fbc2f to dd63af3 Compare September 4, 2024 19:01
Copy link
Contributor

@mfocko mfocko added mergeit When set, zuul wil gate and merge the PR. and removed mergeit When set, zuul wil gate and merge the PR. labels Sep 4, 2024
Copy link
Contributor

Build succeeded (gate pipeline).
https://softwarefactory-project.io/zuul/t/packit-service/buildset/f745b568fc1d41648b3c57b601e377ed

✔️ pre-commit SUCCESS in 2m 22s

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 7daaa24 into packit:main Sep 4, 2024
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Silently ignored error
2 participants