"""Exception for missing s3 files.""" class S3FileNotFound(Exception): """ Exceptions that raises if provided key wasn't found in bucket. Attributes: key (str): Wrong provided key. bucket (str): S3 Bucket. """ def __init__(self, key, bucket): """Show exception message. Args: key (str): Key that wasn't found in provided bucket. bucket (str): Bucket where key had to exist. """ Exception.__init__(self, '{key} not found in bucket {bucket}!'.format( key=key, bucket=bucket))