Looks like retrying should accomplish this out of the box: https://pypi.org/project/retrying/#description.
I believe once it hits the max wait/retries it returns None. If it doesn't, try:expect the exception it throws.
None
try:expect