Simplified has_ghostscript

This commit is contained in:
Andrew Murray 2019-01-09 19:35:17 +11:00
parent 7bf5246b93
commit 93d4c692a5

View File

@ -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