From 4f280e9947c172fdf5afc5e9b5765ff357abe8ef Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Wed, 26 Apr 2023 19:35:33 +1000 Subject: [PATCH] Re-order options by priority MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ondrej Baranovič <3819630+nulano@users.noreply.github.com> --- src/PIL/ImageGrab.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/ImageGrab.py b/src/PIL/ImageGrab.py index 3c72cc219..771590c58 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -61,7 +61,7 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N left, top, right, bottom = bbox im = im.crop((left - x0, top - y0, right - x0, bottom - y0)) return im - elif shutil.which("gnome-screenshot") or shutil.which("scrot"): + elif shutil.which("scrot") or shutil.which("gnome-screenshot"): fh, filepath = tempfile.mkstemp(".png") os.close(fh) if shutil.which("scrot"): # prefer scrot, as it is less intrusive