Merge pull request #48 from spulec/py26

Now supporting Python 2.6 as long as we're using the very latest HTTPretty
This commit is contained in:
Steve Pulec 2013-10-03 17:43:37 -07:00
commit d8ca75deaa
24 changed files with 85 additions and 64 deletions

View file

@ -45,7 +45,7 @@ class EmailResponse(BaseResponse):
destination = self.querystring.get('Destination.ToAddresses.member.1')[0]
message = ses_backend.send_email(source, subject, body, destination)
if not message:
return "Did not have authority to send from email {}".format(source), dict(status=400)
return "Did not have authority to send from email {0}".format(source), dict(status=400)
template = Template(SEND_EMAIL_RESPONSE)
return template.render(message=message)
@ -56,7 +56,7 @@ class EmailResponse(BaseResponse):
message = ses_backend.send_raw_email(source, destination, raw_data)
if not message:
return "Did not have authority to send from email {}".format(source), dict(status=400)
return "Did not have authority to send from email {0}".format(source), dict(status=400)
template = Template(SEND_RAW_EMAIL_RESPONSE)
return template.render(message=message)

View file

@ -7,7 +7,7 @@ def random_hex(length):
def get_random_message_id():
return "{}-{}-{}-{}-{}-{}-{}".format(
return "{0}-{1}-{2}-{3}-{4}-{5}-{6}".format(
random_hex(16),
random_hex(8),
random_hex(4),