Skip to content

Instantly share code, notes, and snippets.

View aviksama's full-sized avatar
🤖
botlike

Avik Samaddar aviksama

🤖
botlike
View GitHub Profile
import os
import sys
from functools import wraps
import gevent
import six
sys.stderr = open(os.devnull, 'w')
from functools import wraps
import gevent
import six
class DoRetry(object):
def __init__(self, times=2, interval=5, exponential_interval=True):
if not (interval > 0 and isinstance(times, int) and times > 0):
raise AttributeError('interval and times must be a positive')