From 54f6cc7ea2695831c85b59c0d25d3855e28ba3e7 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Wed, 6 Feb 2019 19:07:53 +1100 Subject: [PATCH] Changed subprocess stdout from devnull to None --- src/PIL/EpsImagePlugin.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/PIL/EpsImagePlugin.py b/src/PIL/EpsImagePlugin.py index 3a5ff8c75..dad91771f 100644 --- a/src/PIL/EpsImagePlugin.py +++ b/src/PIL/EpsImagePlugin.py @@ -139,13 +139,11 @@ def Ghostscript(tile, size, fp, scale=1): # push data through Ghostscript try: - with open(os.devnull, 'w+b') as devnull: - startupinfo = None - if sys.platform.startswith('win'): - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - subprocess.check_call(command, stdout=devnull, - startupinfo=startupinfo) + startupinfo = None + if sys.platform.startswith('win'): + startupinfo = subprocess.STARTUPINFO() + startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW + subprocess.check_call(command, startupinfo=startupinfo) im = Image.open(outfile) im.load() finally: