Skip to content

Ensure that connection is closed when using context manager#660

Merged
bjoernricks merged 1 commit intomainfrom
disconnect-for-context-manager
Jan 27, 2022
Merged

Ensure that connection is closed when using context manager#660
bjoernricks merged 1 commit intomainfrom
disconnect-for-context-manager

Conversation

@bjoernricks
Copy link
Copy Markdown
Contributor

@bjoernricks bjoernricks commented Jan 27, 2022

What:

When using the context manager on the Gmp class which determines the
supported GMP version ensure that the opened connection is closed when
leaving the context.

Fixes #659

Why:

Always close connections when using context manager.

How:

Checklist:

@bjoernricks bjoernricks force-pushed the disconnect-for-context-manager branch from d0adfac to 696e135 Compare January 27, 2022 13:54
@bjoernricks bjoernricks marked this pull request as ready for review January 27, 2022 13:54
@bjoernricks bjoernricks requested a review from a team January 27, 2022 13:54
@bjoernricks bjoernricks enabled auto-merge January 27, 2022 13:54
Comment thread gvm/protocols/gmp.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2022

Codecov Report

Merging #660 (696e135) into main (73435e7) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head 696e135 differs from pull request most recent head 46b0e4a. Consider uploading reports for the commit 46b0e4a to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #660      +/-   ##
==========================================
- Coverage   98.84%   98.81%   -0.03%     
==========================================
  Files          55       55              
  Lines        3967     3970       +3     
  Branches     1025     1025              
==========================================
+ Hits         3921     3923       +2     
  Misses         33       33              
- Partials       13       14       +1     
Impacted Files Coverage Δ
gvm/protocols/gmp.py 95.12% <100.00%> (+0.38%) ⬆️
gvm/protocols/base.py 90.47% <0.00%> (-2.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73435e7...46b0e4a. Read the comment docs.

When using the context manager on the Gmp class which determines the
supported GMP version ensure that the opened connection is closed when
leaving the context.

Fixes #659
@bjoernricks bjoernricks force-pushed the disconnect-for-context-manager branch from 696e135 to 46b0e4a Compare January 27, 2022 14:04
@bjoernricks bjoernricks requested a review from y0urself January 27, 2022 14:04
@bjoernricks bjoernricks changed the title Ensure that connection is closes when using context manager Ensure that connection is closed when using context manager Jan 27, 2022
@bjoernricks bjoernricks merged commit 44e4363 into main Jan 27, 2022
@bjoernricks bjoernricks deleted the disconnect-for-context-manager branch January 27, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants