diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-22 17:17:05 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-22 17:17:05 +0530 |
commit | 9abf07a53ac57f6c93132822376e6ff0058f0ad5 (patch) | |
tree | 767af0e2e6e053683d15c369b877e60e5193f559 | |
parent | 726ef5b50a90a08ddb1fddd3d0fa8775e21b1c35 (diff) |
added try except incase collada2gltf is not there
-rw-r--r-- | app/dock-manual.py | 10 | ||||
-rw-r--r-- | app/dock-single.py | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/app/dock-manual.py b/app/dock-manual.py index e2da478..c953a36 100644 --- a/app/dock-manual.py +++ b/app/dock-manual.py @@ -80,7 +80,6 @@ def RemoveAllFilesMatching(directory,pattern): FileList = glob.glob(directory+"/*"+pattern) for FilePath in FileList: try: - print(FilePath) os.remove(FilePath) except: print("Error in removing misc file") @@ -138,7 +137,14 @@ with tempfile.TemporaryDirectory() as directory: copyfile("report.pdf",os.path.join(reportDirectory,(str(jobID)+".pdf"))) get3DModel(receptor_name,ligand_name.replace(".pdbqt","_out.pdbqt")) os.system("collada2gltf -i model.dae -o model.gltf") - copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf"))) + try: + copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf"))) + except: + print("Does not have Collada2GLTF Installed") + email(zi) + mycursor.execute('UPDATE curieweb set done=1 where id="%s"' % (jobID)) + mycon.commit() + exit(0) arch = os.popen("uname -m").read() print("Generating 3D Model") if "x86" in arch: diff --git a/app/dock-single.py b/app/dock-single.py index 3526985..90031a1 100644 --- a/app/dock-single.py +++ b/app/dock-single.py @@ -221,7 +221,6 @@ def RemoveAllFilesMatching(directory,pattern): FileList = glob.glob(directory+"/*"+pattern) for FilePath in FileList: try: - print(FilePath) os.remove(FilePath) except: print("Error in removing misc file") |