Less print() more logging.
This commit is contained in:
		
							parent
							
								
									54872357fa
								
							
						
					
					
						commit
						1e2c147f7f
					
				@ -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,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user