utils.py 文件源码

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

项目:awscfncli 作者: Kotaimen 项目源码 文件源码
def boto3_exception_handler(f):
    """Capture and pretty print exceptions"""

    @wraps(f)
    def wrapper(*args, **kwargs):
        try:
            return f(*args, **kwargs)
        except (botocore.exceptions.ClientError,
                botocore.exceptions.WaiterError,
                botocore.exceptions.ParamValidationError,
                ConfigError) as e:
            click.secho(str(e), fg='red')
        except KeyboardInterrupt as e:
            click.secho('Aborted.', fg='red')

    return wrapper
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号