mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fix when sys.executable
is empty or null
This commit is contained in:
parent
26e2c7e030
commit
a0b22d2203
|
@ -178,14 +178,15 @@ class MacViewer(Viewer):
|
|||
else:
|
||||
raise TypeError("Missing required argument: 'path'")
|
||||
subprocess.call(["open", "-a", "Preview.app", path])
|
||||
subprocess.Popen(
|
||||
[
|
||||
sys.executable,
|
||||
"-c",
|
||||
"import os, sys, time; time.sleep(20); os.remove(sys.argv[1])",
|
||||
path,
|
||||
]
|
||||
)
|
||||
if sys.executable:
|
||||
subprocess.Popen(
|
||||
[
|
||||
sys.executable,
|
||||
"-c",
|
||||
"import os, sys, time; time.sleep(20); os.remove(sys.argv[1])",
|
||||
path,
|
||||
]
|
||||
)
|
||||
return 1
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user