Use relevant extension for temporary file

This commit is contained in:
Andrew Murray 2023-06-17 21:01:52 +10:00 committed by Antoine Beyeler
parent 3c4ccdcff5
commit e52fa8fe38

View File

@ -95,7 +95,7 @@ def grab(bbox=None, include_layered_windows=False, all_screens=False, xdisplay=N
def grabclipboard():
if sys.platform == "darwin":
fh, filepath = tempfile.mkstemp(".jpg")
fh, filepath = tempfile.mkstemp(".png")
os.close(fh)
commands = [
'set theFile to (open for access POSIX file "'