Commit f9e37b3d authored by Jérome Perrin's avatar Jérome Perrin

don't fail if pdftk is not found


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35515 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f1b6f273
......@@ -231,8 +231,13 @@ class PDFDocument(Image):
result[key] = value
# Then we use pdftk to get extra metadata
try:
command_result = Popen(['pdftk', tmp.name, 'dump_data', 'output'],
stdout=PIPE).communicate()[0]
except OSError:
# pdftk not found
pass
else:
h = command_result
line_list = (line for line in h.splitlines())
while True:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment