deprecate timeutils.total_seconds()
Because datetime.timedelta doesn't have method total_seconds in Python2.6, we use timeutils.total_seconds() to calculate it manually. Now we dropped Python 2.6, and this method will be deprecated in oslo.utils. According to patch https://review.openstack.org/#/c/248590/, we should use datetime.timedelta.total_seconds() instead of timeutils.total_seconds(). Change-Id: I5a4957ba863d1df332367088140517fd89986147
This commit is contained in:
parent
c55f7480cc
commit
e8a0be43d2
@ -167,7 +167,7 @@ class Evaluator(object):
|
||||
at the original point in time.
|
||||
"""
|
||||
cron.get_prev()
|
||||
diff = timeutils.total_seconds(ts - cron.get_next(datetime.datetime))
|
||||
diff = (ts - cron.get_next(datetime.datetime)).total_seconds()
|
||||
return abs(diff) < 60 # minute precision
|
||||
|
||||
@abc.abstractmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user