

def tif_to_pdf(self):
    'tiff to pdf conversion, use tiff2pdf command (libtiff)'
    path = (os.path.join(os.path.dirname(self.filepath), self.document) + '.pdf')
    p = Popen(('tiff2pdf -o %s %s' % (path, self.filepath)), shell=True, stdout=PIPE, stderr=PIPE)
    (stdout, stderr) = p.communicate()
    content = open(stderr, 'rb').read()
    p = Popen(('rm -rf %s' % path), shell=True, stdout=PIPE, stderr=PIPE)
    return ['application/pdf', content]

dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/libraries/adlibre/converter.py FileConverter.tif_to_pdf/VarMisuse@85/125 `path`->`stderr`