pdf/processing: fix non pdf regression, copy correct file

This commit is contained in:
Alon Levy 2013-12-26 18:35:27 -06:00 committed by Christopher Allan Webber
parent 690f50de1c
commit 0021c06886

View File

@ -316,11 +316,13 @@ class CommonPdfProcessor(MediaProcessor):
"""
Store the pdf. If the file is not a pdf, make it a pdf
"""
tmp_pdf = self.process_filename
tmp_pdf = os.path.splitext(self.process_filename)[0] + '.pdf'
unoconv = where('unoconv')
args = [unoconv, '-v', '-f', 'pdf', self.process_filename]
_log.debug('calling %s' % repr(args))
Popen(executable=unoconv,
args=[unoconv, '-v', '-f', 'pdf', self.process_filename]).wait()
args=args).wait()
if not os.path.exists(tmp_pdf):
_log.debug('unoconv failed to convert file to pdf')