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

In show_file, use os.remove to remove temporary images #6010

Merged
merged 3 commits into from Feb 2, 2022

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Feb 2, 2022

Rather than using rm inside a subprocess shell command, this PR switches to using subprocess without shell to open the image and then os.remove. This should resolve any path problems.

But there is a twist on macOS - Pillow sleeps before removing the image, and we presumably don't want to make our Python script hang for 20 seconds. Instead, this PR uses subprocess to start a Python process that sleeps and removes the file afterwards.

And since that makes sleeping before removing the file nicer, this PR adds sleep for xdg-open, instead of #5950, to help #5945 and #5968

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

2 participants