diff --git a/apps/hrm/services.py b/apps/hrm/services.py index 2f160345..2a18b353 100755 --- a/apps/hrm/services.py +++ b/apps/hrm/services.py @@ -193,18 +193,14 @@ class HrmService: "cardPrivilegeDetails": details } ind = 0 - exception = None while ind < 6: time.sleep(6) try: dhClient.request(**dhapis['card_door_authority'], json=json_data) - exception = None except Exception as e: - exception = e ind = ind + 1 - if exception: - raise exception - # while ind < 6: + if ind >= 6: + raise e # time.sleep(5) # is_ok, res = dhClient.request(**dhapis['card_door_authority'], json=json_data, raise_exception=False) # if is_ok == 'success':