Catch CalledProcessError when checking for Ghostscript

This commit is contained in:
Andrew Murray 2018-09-26 19:52:35 +10:00
parent d4000a8f72
commit 2534b26283

View File

@ -61,7 +61,7 @@ def has_ghostscript():
with open(os.devnull, 'wb') as devnull: with open(os.devnull, 'wb') as devnull:
subprocess.check_call(['gs', '--version'], stdout=devnull) subprocess.check_call(['gs', '--version'], stdout=devnull)
return True return True
except OSError: except (OSError, subprocess.CalledProcessError):
# no ghostscript # no ghostscript
pass pass
return False return False