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:
orderr = acme_client.finalize_order(order, deadline)
except:
current_app.logger.error("Unable to finalize ACME order: {}".format(order), exc_info=True)
except AcmeError:
current_app.logger.error("Unable to resolve Acme order: {}".format(order), exc_info=True)
raise
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):
current_txt_records = []
try:
current_txt_records = client.list_resource_record_sets(
current_records = client.list_resource_record_sets(
HostedZoneId=zone_id,
StartRecordName=domain,
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:
# Current Resource Record does not exist
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
#
acme==0.24.0
acme==0.25.1
alabaster==0.7.11 # via sphinx
alembic-autogenerate-enums==0.0.2
alembic==0.9.9
@ -15,8 +15,8 @@ asyncpool==1.0
babel==2.6.0 # via sphinx
bcrypt==3.1.4
blinker==1.4
boto3==1.7.32
botocore==1.10.32
boto3==1.7.39
botocore==1.10.37
certifi==2018.4.16
cffi==1.11.5
click==6.7