Merge lp:~justin-fathomdb/nova/fix-datetime-parsing into lp:~hudson-openstack/nova/trunk

Proposed by justinsb
Status: Merged
Approved by: Josh Kearney
Approved revision: 858
Merged at revision: 868
Proposed branch: lp:~justin-fathomdb/nova/fix-datetime-parsing
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 11 lines (+1/-1)
1 file modified
nova/image/glance.py (+1/-1)
To merge this branch: bzr merge lp:~justin-fathomdb/nova/fix-datetime-parsing
Reviewer Review Type Date Requested Status
Josh Kearney (community) Approve
Mark Washenberger (community) Approve
Review via email: mp+54646@code.launchpad.net

Description of the change

Don't try to parse the empty string as a datetime

To post a comment you must log in.
Revision history for this message
Mark Washenberger (markwash) wrote :

<holy war> We shouldn't overload the concept of False </holy war>

This is perfect, thanks for catching and fixing my bug.

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/image/glance.py'
2--- nova/image/glance.py 2011-03-21 21:09:53 +0000
3+++ nova/image/glance.py 2011-03-24 03:19:42 +0000
4@@ -73,7 +73,7 @@
5 Returns image with known timestamp fields converted to datetime objects
6 """
7 for attr in ['created_at', 'updated_at', 'deleted_at']:
8- if image.get(attr) is not None:
9+ if image.get(attr):
10 image[attr] = self._parse_glance_iso8601_timestamp(image[attr])
11 return image
12