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

[8.0] fix: close open file #7651

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

fstagni
Copy link
Contributor

@fstagni fstagni commented Jun 5, 2024

closes #7641

BEGINRELEASENOTES

*Framework
FIX: close open file (DISET!)

ENDRELEASENOTES

@DIRACGridBot DIRACGridBot added the alsoTargeting:integration Cherry pick this PR to integration after merge label Jun 5, 2024
@fstagni fstagni marked this pull request as ready for review June 6, 2024 10:04
@@ -71,6 +71,7 @@ def sendFile(self, filename, fileId, token=""):
retVal = transport.receiveData()
return retVal
finally:
fileHelper.oFile.close()
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor

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 !

Copy link
Contributor Author

Choose a reason for hiding this comment

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

review OK then?

@fstagni fstagni merged commit 86470db into DIRACGrid:rel-v8r0 Jun 10, 2024
26 checks passed
@DIRACGridBot DIRACGridBot added the sweep:done All sweeping actions have been done for this PR label Jun 10, 2024
DIRACGridBot pushed a commit to DIRACGridBot/DIRAC that referenced this pull request Jun 10, 2024
@DIRACGridBot
Copy link

Sweep summary

Sweep ran in https://github.com/DIRACGrid/DIRAC/actions/runs/9446730190

Successful:

  • integration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alsoTargeting:integration Cherry pick this PR to integration after merge sweep:done All sweeping actions have been done for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants