From 2534b26283198802d877725838ce68f362117324 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 26 Sep 2018 19:52:35 +1000 Subject: [PATCH] Catch CalledProcessError when checking for Ghostscript --- src/PIL/EpsImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py index 0c50afe13..8e0333ee9 100644 --- a/src/PIL/EpsImagePlugin.py +++ b/src/PIL/EpsImagePlugin.py @@ -61,7 +61,7 @@ def has_ghostscript(): with open(os.devnull, 'wb') as devnull: subprocess.check_call(['gs', '--version'], stdout=devnull) return True - except OSError: + except (OSError, subprocess.CalledProcessError): # no ghostscript pass return False