Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Stephen Girard] handle unexpected max_loaded_at types #1330

Merged
merged 3 commits into from
Mar 5, 2019

Conversation

drewbanin
Copy link
Contributor

Some light error handling. Previously, values like None and datetime.dates would fail with confusing references to ... has no attribute tzinfo.

@drewbanin drewbanin added this to the Stephen Girard milestone Mar 3, 2019
@drewbanin drewbanin changed the title handle unexpected loaded_at field types [Stephen Girard] handle unexpected loaded_at field types Mar 3, 2019
@drewbanin drewbanin changed the title [Stephen Girard] handle unexpected loaded_at field types [Stephen Girard] handle unexpected max_loaded_at types Mar 3, 2019
@drewbanin drewbanin requested a review from beckjake March 4, 2019 23:07
@@ -79,6 +79,26 @@ def _utc(dt):
return dt.replace(tzinfo=pytz.UTC)


def _parse_max_loaded_at(row, source, field_name):
for dt in row:
if dt is None:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this logic just belongs in _utc itself.

…t into fix/handle-unexpected-snapshot-values
@drewbanin drewbanin merged commit 1a700c1 into dev/stephen-girard Mar 5, 2019
@drewbanin drewbanin deleted the fix/handle-unexpected-snapshot-values branch March 5, 2019 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants