corrected exception

This commit is contained in:
Navan Chauhan 2020-09-27 01:14:19 +05:30
parent e68dc5edc3
commit f35398d32d
1 changed files with 1 additions and 1 deletions

View File

@ -228,7 +228,7 @@ with tempfile.TemporaryDirectory() as directory:
make_archive(zi, 'zip', directory) make_archive(zi, 'zip', directory)
try: try:
copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf"))) copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf")))
except: except FileNotFoundError:
reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. " reason = "Could not generate the report, this could be because of a failed docking job. Please check the ZIP archive for the configuration and converted PDBQTs and try submitting manually. "
email(toaddr,jobID,date,description,zipArchive=zi,reason=reason) email(toaddr,jobID,date,description,zipArchive=zi,reason=reason)
mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID)) mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID))