(*args, **kwargs)
| 95 | def decorator(func): |
| 96 | @wraps(func) |
| 97 | def wrapper(*args, **kwargs): |
| 98 | attempts = 0 |
| 99 | while attempts < retries: |
| 100 | try: |
| 101 | return func(*args, **kwargs) |
| 102 | except AssertionError: |
| 103 | attempts += 1 |
| 104 | if attempts >= retries: |
| 105 | raise |
| 106 | time.sleep(delay) |
| 107 | |
| 108 | return wrapper |
| 109 |