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

[16.0][FIX] fs_attachment: Avoid local variable redefine #306

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

lmignon
Copy link
Contributor

@lmignon lmignon commented Nov 29, 2023

When manipulating the file system api through a local variable named fs, we observed some strange behavior when it was wrongly redefined in an enclosing scope as in the following example: with fs.open(...) as fs.
This PR fixes this issue by renaming the local variable and therefore avoiding the name clash.

@lmignon lmignon force-pushed the 16.0-fs-attachment-fix-var-scope branch from c89b0cd to 884a83b Compare November 29, 2023 17:12
@lmignon lmignon marked this pull request as ready for review November 29, 2023 18:49
When manipulating the file system api through a local variable named *fs*,
we observed some strange behavior when it was wrongly redefined in an
enclosing scope as in the following example: *with fs.open(...) as fs*.
This commit fixes this issue by renaming the local variable and therefore
avoiding the name clash.
@lmignon lmignon force-pushed the 16.0-fs-attachment-fix-var-scope branch from 884a83b to c9c73a6 Compare November 29, 2023 18:51
@lmignon
Copy link
Contributor Author

lmignon commented Nov 29, 2023

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-306-by-lmignon-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit aea9e11 into OCA:16.0 Nov 29, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 8fa213a. Thanks a lot for contributing to OCA. ❤️

@lmignon lmignon deleted the 16.0-fs-attachment-fix-var-scope branch November 29, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants