(func)
return wrapper
retry connection
retry connection
retry connection
def connection_retry(func):
    """retry connection"""

    def wrapper(self, *args, **kwargs):
        """wrapper"""
        res = None
        for ntry in range(60):
            try:
                res = func(self, *args, **kwargs)
                break
            except Exception as e:
                LOGGER.debug(e)
                time.sleep(3)
        return res

    return wrapper
def connection_retry ( func ) : def wrapper ( self , * args , * * kwargs ) : """wrapper""" res = None for ntry in range ( 60 ) : try : res = func ( self , * args , * * kwargs ) break except Exception as e : LOGGER . debug ( e ) time . sleep ( 3 ) return res return wrapper