summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Weller <ianweller@gmail.com>2008-10-02 17:07:02 -0500
committerIan Weller <ianweller@gmail.com>2008-10-02 17:07:02 -0500
commit40a708b3717df5b6c956d39f6099437470fe3486 (patch)
treea2ac76544fb1ecc4eaba024b5ef74cf8c815818c
parent255ef779a5dd3fe34febb53c05664fc7c4755cf7 (diff)
downloadfedora-business-cards-40a708b3717df5b6c956d39f6099437470fe3486.zip
fedora-business-cards-40a708b3717df5b6c956d39f6099437470fe3486.tar.gz
fedora-business-cards-40a708b3717df5b6c956d39f6099437470fe3486.tar.xz
Pipe out stderr when calling inkscape
-rw-r--r--fedora_business_cards/export.py6
1 files 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")