From f672bf6cd4ebbc1fc3a6587a35974d1beed26208 Mon Sep 17 00:00:00 2001 From: Hankson Bradley Date: Wed, 19 Apr 2023 15:58:01 +0800 Subject: [PATCH] Update src/PIL/ImageGrab.py Co-authored-by: Andrew Murray <3112309+radarhere@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 287529834..3c72cc219 100644 --- a/src/PIL/ImageGrab.py +++ b/src/PIL/ImageGrab.py @@ -64,7 +64,7 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N elif shutil.which("gnome-screenshot") or shutil.which("scrot"): fh, filepath = tempfile.mkstemp(".png") os.close(fh) - if shutil.which("scrot"): # use scrot when have + if shutil.which("scrot"): # prefer scrot, as it is less intrusive subprocess.call([shutil.which("scrot"), "-z", "--overwrite", filepath]) else: subprocess.call([shutil.which("gnome-screenshot"), "-f", filepath])