diff options
author | Daniel G. Taylor <dan@programmer-art.org> | 2014-08-22 10:07:22 -0700 |
---|---|---|
committer | Daniel G. Taylor <dan@programmer-art.org> | 2014-08-22 10:07:22 -0700 |
commit | c620c43872cd52824ad4a4ba38fc998c8dfa2762 (patch) | |
tree | 08a495d855ff58c77ba619a6c0348d90f1aa1af7 /boto | |
parent | 9efebc2680fea86986010fca0a2642e59c6434cf (diff) | |
parent | cf91629fcd33a4642a75c8fabb24e88affc2e83d (diff) | |
download | boto-c620c43872cd52824ad4a4ba38fc998c8dfa2762.tar.gz |
Merge pull request #2538 from felixonmars/ses-tidy
PEP8 style fixes for SES. Fixes #2538.
Diffstat (limited to 'boto')
-rw-r--r-- | boto/ses/connection.py | 41 | ||||
-rw-r--r-- | boto/ses/exceptions.py | 5 |
2 files changed, 24 insertions, 22 deletions
diff --git a/boto/ses/connection.py b/boto/ses/connection.py index ed69ad29..d9774125 100644 --- a/boto/ses/connection.py +++ b/boto/ses/connection.py @@ -48,13 +48,13 @@ class SESConnection(AWSAuthConnection): self.DefaultRegionEndpoint) self.region = region super(SESConnection, self).__init__(self.region.endpoint, - aws_access_key_id, aws_secret_access_key, - is_secure, port, proxy, proxy_port, - proxy_user, proxy_pass, debug, - https_connection_factory, path, - security_token=security_token, - validate_certs=validate_certs, - profile_name=profile_name) + aws_access_key_id, aws_secret_access_key, + is_secure, port, proxy, proxy_port, + proxy_user, proxy_pass, debug, + https_connection_factory, path, + security_token=security_token, + validate_certs=validate_certs, + profile_name=profile_name) def _required_auth_capability(self): return ['ses'] @@ -260,18 +260,18 @@ class SESConnection(AWSAuthConnection): raise ValueError("No text or html body found for mail") self._build_list_params(params, to_addresses, - 'Destination.ToAddresses.member') + 'Destination.ToAddresses.member') if cc_addresses: self._build_list_params(params, cc_addresses, - 'Destination.CcAddresses.member') + 'Destination.CcAddresses.member') if bcc_addresses: self._build_list_params(params, bcc_addresses, - 'Destination.BccAddresses.member') + 'Destination.BccAddresses.member') if reply_addresses: self._build_list_params(params, reply_addresses, - 'ReplyToAddresses.member') + 'ReplyToAddresses.member') return self._make_request('SendEmail', params) @@ -318,7 +318,7 @@ class SESConnection(AWSAuthConnection): if destinations: self._build_list_params(params, destinations, - 'Destinations.member') + 'Destinations.member') return self._make_request('SendRawEmail', params) @@ -475,7 +475,7 @@ class SESConnection(AWSAuthConnection): """ params = {} self._build_list_params(params, identities, - 'Identities.member') + 'Identities.member') return self._make_request('GetIdentityVerificationAttributes', params) def verify_domain_identity(self, domain): @@ -531,17 +531,17 @@ class SESConnection(AWSAuthConnection): :param identity: An email address or domain name. :type notification_type: string - :param notification_type: The type of feedback notifications that will + :param notification_type: The type of feedback notifications that will be published to the specified topic. Valid Values: Bounce | Complaint | Delivery :type sns_topic: string or None - :param sns_topic: The Amazon Resource Name (ARN) of the Amazon Simple - Notification Service (Amazon SNS) topic. + :param sns_topic: The Amazon Resource Name (ARN) of the Amazon Simple + Notification Service (Amazon SNS) topic. """ params = { - 'Identity': identity, - 'NotificationType': notification_type + 'Identity': identity, + 'NotificationType': notification_type } if sns_topic: params['SnsTopic'] = sns_topic @@ -560,7 +560,6 @@ class SESConnection(AWSAuthConnection): :param forwarding_enabled: Specifies whether or not to enable feedback forwarding. """ return self._make_request('SetIdentityFeedbackForwardingEnabled', { - 'Identity': identity, - 'ForwardingEnabled': 'true' if forwarding_enabled else 'false' + 'Identity': identity, + 'ForwardingEnabled': 'true' if forwarding_enabled else 'false' }) - diff --git a/boto/ses/exceptions.py b/boto/ses/exceptions.py index c3341ece..d5649f61 100644 --- a/boto/ses/exceptions.py +++ b/boto/ses/exceptions.py @@ -3,6 +3,7 @@ Various exceptions that are specific to the SES module. """ from boto.exception import BotoServerError + class SESError(BotoServerError): """ Sub-class all SES-related errors from here. Don't raise this error @@ -13,24 +14,26 @@ class SESError(BotoServerError): pass - class SESAddressNotVerifiedError(SESError): """ Raised when a "Reply-To" address has not been validated in SES yet. """ pass + class SESIdentityNotVerifiedError(SESError): """ Raised when an identity (domain or address) has not been verified in SES yet. """ pass + class SESDomainNotConfirmedError(SESError): """ """ pass + class SESAddressBlacklistedError(SESError): """ After you attempt to send mail to an address, and delivery repeatedly |