def try_again(f):
    def _(self, *a, **kw):
        for i in range(3):
            try:
                return f(self, *a, **kw)
            except __HOLE__ as e:
                self.close()
                logger.warning("mfs master connection: %s", e)
                time.sleep(2**i * 0.1)
        else:
            raise
    return _
dataset/ETHPy150Open douban/dpark/dpark/moosefs/master.py/try_again