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():
|
def has_ghostscript():
|
||||||
if gs_windows_binary:
|
if gs_windows_binary is not None:
|
||||||
return True
|
return gs_windows_binary is not False
|
||||||
if not sys.platform.startswith('win'):
|
else:
|
||||||
import subprocess
|
import subprocess
|
||||||
try:
|
try:
|
||||||
with open(os.devnull, 'wb') as devnull:
|
with open(os.devnull, 'wb') as devnull:
|
||||||
|
@ -63,8 +63,7 @@ def has_ghostscript():
|
||||||
return True
|
return True
|
||||||
except OSError:
|
except OSError:
|
||||||
# No Ghostscript
|
# No Ghostscript
|
||||||
pass
|
return False
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
def Ghostscript(tile, size, fp, scale=1):
|
def Ghostscript(tile, size, fp, scale=1):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user