From 1086f53538fe039f8be81cdb67e69d40b914beca Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Mon, 31 Aug 2020 13:51:05 +0530 Subject: [PATCH] added try except block --- app/dock-single.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/dock-single.py b/app/dock-single.py index 79337cf..c3f0cb5 100644 --- a/app/dock-single.py +++ b/app/dock-single.py @@ -245,7 +245,10 @@ with tempfile.TemporaryDirectory() as directory: os.system("collada2gltf -i model.dae -o model.gltf") copyfile("model.gltf",os.path.join(modelDirectory,(str(jobID)+".gltf"))) os.system("docker run -it --rm -v $(pwd):/usr/app leon/usd-from-gltf:latest model.gltf model.usdz") - copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz"))) + try: + copyfile("model.usdz",os.path.join(modelDirectory,(str(jobID)+".usdz"))) + except: + print("Could not generate USDZ file") #copy(("Curie_Web_Result_"+str(jobID)),f) email(zi) #print((str(zi) + ".zip"))