MCPcopy
hub / github.com/django/django / wrapper

Function wrapper

tests/cache/tests.py:97–106  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

sleepMethod · 0.80

Tested by

no test coverage detected