Skip to content

Raise error if ImageGrab subprocess gives non-zero returncode#9321

Open
radarhere wants to merge 2 commits intopython-pillow:mainfrom
radarhere:subprocess
Open

Raise error if ImageGrab subprocess gives non-zero returncode#9321
radarhere wants to merge 2 commits intopython-pillow:mainfrom
radarhere:subprocess

Conversation

@radarhere
Copy link
Member

#9070 (comment) suggested checking the subprocess return code in ImageGrab. This PR adds it, following the example of

if retcode:
raise subprocess.CalledProcessError(retcode, quant_cmd)

I've also added additional testing, as per #9070 (comment), including opening a new window on macOS to test capturing it. To avoid interfering too much with user machines though, this will only happen on CIs.

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.

1 participant