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 ResourceWarning 'unclosed file' if LockException is raised #50

Merged

Conversation

ahauan4
Copy link
Contributor

@ahauan4 ahauan4 commented Apr 12, 2020

Fixes ResourceWarning 'unclosed file' if LockException is raised

The following warning is raised:
ResourceWarning: unclosed file
Object allocated at (most recent call last):
File "portalocker\utils.py", lineno 174
return open(self.filename, self.mode, **self.file_open_kwargs)

ResourceWarning: unclosed file
Object allocated at (most recent call last):
  File "portalocker\utils.py", lineno 174
    return open(self.filename, self.mode, **self.file_open_kwargs)
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling de9a7c4 on ahauan4:ahauan4-fix-ressource-warning-unclosed-file into a306f61 on WoLpH:develop.

@codecov
Copy link

codecov bot commented Apr 12, 2020

Codecov Report

Merging #50 into develop will not change coverage by %.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           develop       #50   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          160       161    +1     
  Branches        13        13           
=========================================
+ Hits           160       161    +1     
Impacted Files Coverage Δ
portalocker/utils.py 100.00% <100.00%> (ø)

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 a306f61...de9a7c4. Read the comment docs.

@wolph wolph merged commit c42e302 into wolph:develop Apr 12, 2020
@wolph
Copy link
Owner

wolph commented Apr 12, 2020

Good fix, thank you!

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.

None yet

3 participants