Use newer location for iso8601 UTC
Newer versions have moved from iso8601.iso8601.Utc() to just iso8601.UTC, causing tests to fail under py35. Change-Id: I59c771b6803866282912c2067ff5ed25bba13626 Closes-bug: #1715486
This commit is contained in:
parent
7e16d77317
commit
640217d22e
@ -166,7 +166,7 @@ def datetime_or_none(dt):
|
|||||||
# NOTE(danms): Legacy objects from sqlalchemy are stored in UTC,
|
# NOTE(danms): Legacy objects from sqlalchemy are stored in UTC,
|
||||||
# but are returned without a timezone attached.
|
# but are returned without a timezone attached.
|
||||||
# As a transitional aid, assume a tz-naive object is in UTC.
|
# As a transitional aid, assume a tz-naive object is in UTC.
|
||||||
return dt.replace(tzinfo=iso8601.iso8601.Utc())
|
return dt.replace(tzinfo=iso8601.UTC)
|
||||||
else:
|
else:
|
||||||
return dt
|
return dt
|
||||||
raise ValueError(_("A datetime.datetime is required here"))
|
raise ValueError(_("A datetime.datetime is required here"))
|
||||||
|
Loading…
Reference in New Issue
Block a user