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 bugs picked up by static analysis #2399

Merged
merged 16 commits into from
Oct 11, 2022
Merged

Conversation

jhale
Copy link
Member

@jhale jhale commented Oct 7, 2022

This PR fixes a few bugs picked up by SonarCloud.

Because the code with the two except OSError was incorrect (an exception block can only pickup a single exception type at a time) and used in three places

I decided to refactor the PETSc shared library loader into its own function. I removed the call to find the PETSc library using ctypes, this is likely to create a conflict with the version that petsc4py was compiled against. It still works if the library is in e.g. /usr/local/lib as shown by the successful RockyLinux CI run.

@garth-wells garth-wells merged commit 3d6b15e into main Oct 11, 2022
@garth-wells garth-wells deleted the jhale/fix-static-analysis-bugs branch October 11, 2022 11:32
@garth-wells garth-wells added the housekeeping Tidying and style improvements label Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping Tidying and style improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants