bless_aws.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:python-blessclient 作者: lyft 项目源码 文件源码
def iam_client(self):
        if not self.iam:
            for attempt in count():
                try:
                    self.iam = boto3.client('iam')
                    break
                except DataNotFoundError as e:
                    logging.exception('DataNotFoundError when trying to get the iam client.')
                    t = self.retry_policy(attempt)
                    if t is None:
                        logging.info('Not retrying')
                        raise LambdaInvocationException('Exhausted retries getting iam client')
                    logging.info('Retrying in {} seconds'.format(t))
                    sleep(t)
                    logging.info('Retrying now')
        return self.iam
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号