Fix DeprecationWarning when call method delta_seconds
We deprecated method total_seconds in 3.1, but method delta_seconds still use it, this leads DeprecationWarnings in Nova which uses method timeutils.delta_seconds. So don't call total_seconds in method delta_seconds. Change-Id: Iad3aca09f2b0c7abce8046931c4ecbc59a09e4c0
This commit is contained in:
parent
e46a46ba90
commit
dafa5e95bd
@ -295,7 +295,7 @@ def delta_seconds(before, after):
|
||||
datetime objects (as a float, to microsecond resolution).
|
||||
"""
|
||||
delta = after - before
|
||||
return total_seconds(delta)
|
||||
return delta.total_seconds()
|
||||
|
||||
|
||||
@removals.remove(
|
||||
|
Loading…
x
Reference in New Issue
Block a user