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 flock for the feed lock file instead of just looking for existence. #257

Merged
merged 7 commits into from
May 15, 2020

Conversation

jjnicola
Copy link
Member

No description provided.

@jjnicola jjnicola requested a review from bjoernricks as a code owner May 14, 2020 12:37
@jjnicola jjnicola removed the request for review from bjoernricks May 14, 2020 13:44
@jjnicola jjnicola marked this pull request as draft May 14, 2020 13:47
Use Path.open() instead of open()
Update test to use the mocked assert_called_once()
@codecov
Copy link

codecov bot commented May 14, 2020

Codecov Report

Merging #257 into master will increase coverage by 0.06%.
The diff coverage is 87.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #257      +/-   ##
==========================================
+ Coverage   82.26%   82.33%   +0.06%     
==========================================
  Files           9        9              
  Lines        1438     1455      +17     
==========================================
+ Hits         1183     1198      +15     
- Misses        255      257       +2     
Impacted Files Coverage Δ
ospd_openvas/lock.py 85.71% <87.50%> (+1.09%) ⬆️

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 32ebb76...9b89d7c. Read the comment docs.

@jjnicola jjnicola marked this pull request as ready for review May 14, 2020 15:23
@jjnicola jjnicola requested a review from bjoernricks May 14, 2020 15:23
try:
self._fd.close()
self._fd = None
except (AttributeError, TypeError):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't self._fd.close() raise other errors then AttributeError or TypeError ?

@jjnicola jjnicola requested a review from bjoernricks May 15, 2020 06:53
@bjoernricks bjoernricks merged commit dd9889f into greenbone:master May 15, 2020
@jjnicola jjnicola deleted the flock branch May 15, 2020 06:59
@cfi-gb cfi-gb mentioned this pull request May 28, 2020
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