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

gui: Use context manager for opening files and temporary files #4917

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

echoix
Copy link
Member

@echoix echoix commented Jan 4, 2025

Analogous to #4908, but for gui/.

There will be conflicts for either this PR or #4916, the first one to be merge will be good. I had to manually untangle these two to make the branch.

@echoix echoix requested a review from ninsbl January 4, 2025 23:59
@echoix
Copy link
Member Author

echoix commented Jan 5, 2025

I'll wait for this or #4916 (maybe both) to be merged before rebasing my work and file the equivalent of #4911 for gui, that is also big

@github-actions github-actions bot added GUI wxGUI related Python Related code is in Python labels Jan 5, 2025
@echoix echoix requested a review from petrasovaa January 16, 2025 03:22
Copy link
Member

@wenzeslaus wenzeslaus left a comment

Choose a reason for hiding this comment

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

14 out of 29 viewed so far. See my comment.

Comment on lines +144 to +145
with open(os.devnull, "w+") as nuldev:
grass.call(["make"], stderr=nuldev)
Copy link
Member

Choose a reason for hiding this comment

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

This whole thing is indetend just because subprocess.DEVNULL. Did you consider adding it?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, what do you mean by "adding it"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related Python Related code is in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants