From 0021c06886555ef6bde728e3684263cd50c79af6 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 26 Dec 2013 18:35:27 -0600 Subject: [PATCH] pdf/processing: fix non pdf regression, copy correct file --- mediagoblin/media_types/pdf/processing.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mediagoblin/media_types/pdf/processing.py b/mediagoblin/media_types/pdf/processing.py index 4dd894d8..a000007a 100644 --- a/mediagoblin/media_types/pdf/processing.py +++ b/mediagoblin/media_types/pdf/processing.py @@ -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') -- 2.25.1