From 9867b51d894332dcd219f3ea7ac4a6d5b47242fc Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 21 Apr 2026 07:51:50 +1000 Subject: [PATCH] Catch subprocess.CalledProcessError in test_grab_x11 --- Tests/test_imagegrab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_imagegrab.py b/Tests/test_imagegrab.py index 07cb69719..180682c64 100644 --- a/Tests/test_imagegrab.py +++ b/Tests/test_imagegrab.py @@ -35,7 +35,7 @@ class TestImageGrab: ImageGrab.grab() ImageGrab.grab(xdisplay="") - except OSError as e: + except (OSError, subprocess.CalledProcessError) as e: pytest.skip(str(e)) @pytest.mark.skipif(Image.core.HAVE_XCB, reason="tests missing XCB")