Skip to content

Commit

Permalink
dev(hansbug): add overwrite
Browse files Browse the repository at this point in the history
  • Loading branch information
HansBug committed Apr 18, 2023
1 parent 02750e3 commit ccba61b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PIL/ImageGrab.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N
fh, filepath = tempfile.mkstemp(".png")
os.close(fh)
if shutil.which("scrot"): # use scrot when have
subprocess.call([shutil.which("scrot"), "-z", filepath])
subprocess.call([shutil.which("scrot"), "-z", "--overwrite", filepath])
else:
subprocess.call([shutil.which("gnome-screenshot"), "-f", filepath])
im = Image.open(filepath)
Expand Down

0 comments on commit ccba61b

Please sign in to comment.