Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Fix storage of ACM certificates #1210

Merged
merged 2 commits into from
Jun 26, 2019
Merged

Conversation

pdallegrave
Copy link
Contributor

Problem
As referenced in #1209, the acm.py slup() method is not properly parsing ACM certificates that contain "UpdatedAt" key.

Fix
Add another conditional that will convert datetime object into ISO string.

@@ -97,6 +97,9 @@ def slurp(self):
config.update({ 'IssuedAt': config.get('IssuedAt').astimezone(tzutc()).isoformat() })
if config.get('ImportedAt'):
config.update({ 'ImportedAt': config.get('ImportedAt').astimezone(tzutc()).isoformat()})
if config.get('RenewalSummary').get('UpdatedAt'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update to:

if config.get('RenewalSummary', {}).get('UpdatedAt'):
    config['RenewalSummary']['UpdatedAt'] = config['RenewalSummary']['UpdatedAt'].astimezone(tzutc()).isoformat()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes applied.

Copy link
Contributor

@mikegrima mikegrima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mikegrima mikegrima merged commit 299d1e0 into Netflix:develop Jun 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants