mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 16:22:22 +03:00
Do not call sys.executable in ImageShow in PyInstaller application (#9028)
This commit is contained in:
commit
8cf8b0dde0
|
@ -175,7 +175,9 @@ class MacViewer(Viewer):
|
|||
if not os.path.exists(path):
|
||||
raise FileNotFoundError
|
||||
subprocess.call(["open", "-a", "Preview.app", path])
|
||||
executable = sys.executable or shutil.which("python3")
|
||||
|
||||
pyinstaller = getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS")
|
||||
executable = (not pyinstaller and sys.executable) or shutil.which("python3")
|
||||
if executable:
|
||||
subprocess.Popen(
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue
Block a user