for dname in subdirList:
os.mkdir(os.path.join(dirname.replace(td_in, td_out), dname))
for fname in fileList:
- file_name = os.path.join(td_in, os.path.join(short, fname))
+ file_name = os.path.join(short, fname)
if fname.lower().endswith(".pdf"):
pdfs.append(file_name)
else:
with open(ERROR_FILE, "a") as logfile:
print("timeout pdftotext", PDF_CONVERSION_TIMEOUT, input_path, input_pdf, output_txt, file=logfile)
logging.warning(" timeout-pdftotext {}s {}".format(PDF_CONVERSION_TIMEOUT, input_pdf))
- os.remove(pdf)
+ os.remove(input_pdf)
# Put the results into a .tar.gz file
with lib.timer("tar", logging.warning):