Merge pull request #3635 from radarhere/eps

Changed EPS subprocess stdout from devnull to None
This commit is contained in:
Hugo 2019-03-11 21:15:18 +02:00 committed by GitHub
commit 77d1c609f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,13 +141,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: