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

Use Python contexts to properly handle serial connection #42

Merged
merged 11 commits into from
Aug 21, 2023

Conversation

lobis
Copy link
Owner

@lobis lobis commented Aug 17, 2023

There are some inconsistencies detected while running tests where the tests fail due to serial connection no being properly closed. This PR implements a way to properly handle the serial connection:

  • Use of with:
with Caen() as caen:
    ...
  • Manually open and close:
caen = Caen()
caen.open()
...
caen.close()

@lobis lobis added the enhancement New feature or request label Aug 17, 2023
@lobis lobis requested a review from AlonsoDRDLV August 17, 2023 21:57
@lobis lobis linked an issue Aug 17, 2023 that may be closed by this pull request
@lobis lobis marked this pull request as ready for review August 21, 2023 10:00
@lobis lobis merged commit d19900d into main Aug 21, 2023
12 checks passed
@lobis lobis deleted the 41-serial-port-not-being-closed-properly branch August 21, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Serial port not being closed properly
2 participants