mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-25 22:54:46 +03:00
Simplified has_ghostscript
This commit is contained in:
parent
7bf5246b93
commit
93d4c692a5
|
@ -53,9 +53,9 @@ if sys.platform.startswith('win'):
|
|||
|
||||
|
||||
def has_ghostscript():
|
||||
if gs_windows_binary:
|
||||
return True
|
||||
if not sys.platform.startswith('win'):
|
||||
if gs_windows_binary is not None:
|
||||
return gs_windows_binary is not False
|
||||
else:
|
||||
import subprocess
|
||||
try:
|
||||
with open(os.devnull, 'wb') as devnull:
|
||||
|
@ -63,7 +63,6 @@ def has_ghostscript():
|
|||
return True
|
||||
except OSError:
|
||||
# No Ghostscript
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user