From 40a708b3717df5b6c956d39f6099437470fe3486 Mon Sep 17 00:00:00 2001 From: Ian Weller Date: Thu, 2 Oct 2008 17:07:02 -0500 Subject: Pipe out stderr when calling inkscape --- fedora_business_cards/export.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fedora_business_cards/export.py b/fedora_business_cards/export.py index 5e4c23e..655ccc6 100644 --- a/fedora_business_cards/export.py +++ b/fedora_business_cards/export.py @@ -45,12 +45,14 @@ def svg_to_pdf_png(xmlstring, filename, format='png', dpi=300): command = ['inkscape', '-C -z -d', str(dpi), '-e', filename, '/dev/stdin'] if format == 'png': sp = subprocess.Popen(' '.join(command), shell=True, - stdin=subprocess.PIPE, stdout=subprocess.PIPE,) + stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) sp.communicate(stdin) elif format == 'pdf': command[3] = '-A' sp = subprocess.Popen(' '.join(command), shell=True, - stdin=subprocess.PIPE, stdout=subprocess.PIPE,) + stdin=subprocess.PIPE, stdout=subprocess.PIPE, + stderr=subprocess.PIPE) sp.communicate(stdin) else: raise Exception("Invalid file format requested") -- cgit