rambo 4 ماه پیش
والد
کامیت
9808c37f3a
1فایلهای تغییر یافته به همراه6 افزوده شده و 7 حذف شده
  1. 6 7
      python/api.py

+ 6 - 7
python/api.py

@@ -420,7 +420,9 @@ async def process_handle_detail(request: Request, params: HandlerDetail):
                     raise UnicornException(path)
     except UnicornException as e:
         handler_result_folder = ""
-        handler_result = e.msg
+        handler_result.append(
+            {"goods_art_no": "", "success": False, "info": str(e.msg)}
+        )
         print(f"UnicornException 生成错误信息:{e}")
         await sendAsyncMessage(
             msg="处理结束",
@@ -761,17 +763,14 @@ async def process_handle_detail(request: Request, params: HandlerDetail):
             )
     except UnicornException as e:
         handler_result_folder = ""
-        handler_result = e.msg
+        handler_result.append(
+            {"goods_art_no": "", "success": False, "info": str(e.msg)}
+        )
         print(f"UnicornException 生成错误信息:{e}")
     except Exception as e:
         print(f"详情图生成错误信息:{e}")
         handler_result_folder = ""
         handler_result.append({"goods_art_no": "", "success": False, "info": str(e)})
-    # return {
-    #     "code": 0,
-    #     "msg": "",
-    #     "data": {"output_folder": handler_result_folder, "list": handler_result},
-    # }
     await sendAsyncMessage(
         msg="处理结束",
         data={"output_folder": handler_result_folder, "list": handler_result},