mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-13 16:54:45 +03:00
Update src/PIL/ImageGrab.py
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
This commit is contained in:
parent
5f62aaec5c
commit
f672bf6cd4
|
@ -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])
|
||||
|
|
Loading…
Reference in New Issue
Block a user