Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Curtis Castrapel 2018-06-28 13:51:23 -07:00
commit 846027b9e3
3 changed files with 11 additions and 7 deletions

View File

@ -116,8 +116,8 @@ def request_certificate(acme_client, authorizations, csr, order):
try: try:
orderr = acme_client.finalize_order(order, deadline) orderr = acme_client.finalize_order(order, deadline)
except: except AcmeError:
current_app.logger.error("Unable to finalize ACME order: {}".format(order), exc_info=True) current_app.logger.error("Unable to resolve Acme order: {}".format(order), exc_info=True)
raise raise
pem_certificate = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM, pem_certificate = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_PEM,

View File

@ -35,11 +35,15 @@ def find_zone_id(domain, client=None):
def change_txt_record(action, zone_id, domain, value, client=None): def change_txt_record(action, zone_id, domain, value, client=None):
current_txt_records = [] current_txt_records = []
try: try:
current_txt_records = client.list_resource_record_sets( current_records = client.list_resource_record_sets(
HostedZoneId=zone_id, HostedZoneId=zone_id,
StartRecordName=domain, StartRecordName=domain,
StartRecordType='TXT', StartRecordType='TXT',
MaxItems="1")["ResourceRecordSets"][0]["ResourceRecords"] MaxItems="1")["ResourceRecordSets"]
for record in current_records:
if record.get('Type') == 'TXT':
current_txt_records.extend(record.get("ResourceRecords", []))
except Exception as e: except Exception as e:
# Current Resource Record does not exist # Current Resource Record does not exist
if "NoSuchHostedZone" not in str(type(e)): if "NoSuchHostedZone" not in str(type(e)):

View File

@ -4,7 +4,7 @@
# #
# pip-compile --no-index --output-file requirements-docs.txt requirements-docs.in # pip-compile --no-index --output-file requirements-docs.txt requirements-docs.in
# #
acme==0.24.0 acme==0.25.1
alabaster==0.7.11 # via sphinx alabaster==0.7.11 # via sphinx
alembic-autogenerate-enums==0.0.2 alembic-autogenerate-enums==0.0.2
alembic==0.9.9 alembic==0.9.9
@ -15,8 +15,8 @@ asyncpool==1.0
babel==2.6.0 # via sphinx babel==2.6.0 # via sphinx
bcrypt==3.1.4 bcrypt==3.1.4
blinker==1.4 blinker==1.4
boto3==1.7.32 boto3==1.7.39
botocore==1.10.32 botocore==1.10.37
certifi==2018.4.16 certifi==2018.4.16
cffi==1.11.5 cffi==1.11.5
click==6.7 click==6.7