-
Notifications
You must be signed in to change notification settings - Fork 175
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
[8.0] fix: close open file #7651
Conversation
@@ -71,6 +71,7 @@ def sendFile(self, filename, fileId, token=""): | |||
retVal = transport.receiveData() | |||
return retVal | |||
finally: | |||
fileHelper.oFile.close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oFile is not necessarily set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to follow down the list of calls and seems like it is set. Given the fact that the integration tests pass, we can be a bit confident that it is indeed set. But if you prefer, I put it in a try...except
clause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only ever created in case the first argument of getFileDescriptor
is a string, which is always true here, so you can forget my comment !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review OK then?
Sweep summary Sweep ran in https://github.com/DIRACGrid/DIRAC/actions/runs/9446730190 Successful:
|
closes #7641
BEGINRELEASENOTES
*Framework
FIX: close open file (DISET!)
ENDRELEASENOTES