From 6c25f6a9321ffb507993b0414e3697c8a6a87639 Mon Sep 17 00:00:00 2001 From: nineven Date: Sat, 16 Apr 2022 20:37:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=AD=BE=E5=90=8D=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=80=85=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/xsign/utils/supersignutils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fir_ser/xsign/utils/supersignutils.py b/fir_ser/xsign/utils/supersignutils.py index 78c1fdc..a950ae0 100644 --- a/fir_ser/xsign/utils/supersignutils.py +++ b/fir_ser/xsign/utils/supersignutils.py @@ -468,6 +468,11 @@ def check_sign_is_exists(user_obj, app_obj, udid, developer_obj, sign=True): logger.warning(f"udid {udid} not exist app_id {app_obj} . start find developer and sign") +def change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj): + if developer_status == AppleDeveloperStatus.ACTIVATED and developer_obj.status != developer_status: + sign_failed_notify(user_obj, developer_obj, app_obj) + + class IosUtils(object): def __init__(self, udid_info, user_obj, app_obj=None): self.developer_obj = None @@ -638,6 +643,7 @@ class IosUtils(object): """ device_udid = udid_info.get('udid') device_name = udid_info.get('product') + developer_status = developer_obj.status if not device_udid: logger.error("device udid is not exists. so return and exit") return True, 'continue' @@ -687,6 +693,7 @@ class IosUtils(object): DeviceStatus.INELIGIBLE]).first() if sync_device_obj: msg = result + change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj) if UserConfig(user_obj).DEVELOPER_WAIT_ABNORMAL_DEVICE: update_or_create_abnormal_device(sync_device_obj, user_obj, app_obj, client_ip) msg = 'DEVELOPER_WAIT_ABNORMAL_DEVICE' @@ -707,6 +714,7 @@ class IosUtils(object): if not status: sync_device_obj, _ = update_or_create_developer_udid_info(device_obj, developer_obj) msg = '设备状态异常' + change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj) if UserConfig(user_obj).DEVELOPER_WAIT_ABNORMAL_DEVICE: update_or_create_abnormal_device(sync_device_obj, user_obj, app_obj, client_ip) msg = 'DEVELOPER_WAIT_ABNORMAL_DEVICE'