Less print() more logging.

This commit is contained in:
Alex Wright 2018-11-05 20:34:12 +01:00
parent 54872357fa
commit 1e2c147f7f
1 changed files with 1 additions and 2 deletions

View File

@ -38,13 +38,12 @@ def convert():
input_path = os.path.join(job_dir, 'input.' + input_ext)
input_file.save(input_path)
outputs = request.form['outputs'].split(',')
results = []
for output in outputs:
output_filename = '{0}.{1}'.format(input_base, output)
output_path = os.path.join(job_dir, output_filename)
print('Converting {0} to {1}'.format(input_path, output_path))
logger.info('Converting {0} to {1}'.format(input_path, output_path))
pypandoc.convert(input_path, output, outputfile=output_path)
results.append({
'input': input_path,