Przeglądaj źródła

iiii

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 4 lat temu
rodzic
commit
9b52d69f96
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      jianye_report.py

+ 2 - 2
jianye_report.py

@@ -407,9 +407,9 @@ class JianYeReport(object):
         message['customer'] = str(customer_id)
         send_data = []
         if customers:
+            save_path = FileUtil().save_path_create()
             for customer in customers:
                 try:
-                    save_path = FileUtil().save_path_create()
                     name = customer[1]
                     mail = customer[2]
                     customer_type = customer[3]
@@ -472,7 +472,7 @@ class JianYeReport(object):
                             # name, mail, report_name, push_time, send_status, status, error_message
                             send_mail_log.append([mail[5], mail[2], mail[3], 1, 'success'])
                         else:
-                            # send_mail_log.append([mail[5], mail[2], mail[3], -1, 'fail'])
+                            send_mail_log.append([mail[5], mail[2], mail[3], -1, 'fail:{}'.format(str(result))])
                             pass
                     else:
                         for m in self.customer_mails: