From 8be89e1076369c057c170727d4c4418ffaafbadd Mon Sep 17 00:00:00 2001 From: Sean McGinnis Date: Mon, 4 May 2020 17:23:36 -0500 Subject: [PATCH] Remove monotonic usage The monotonic package was needed for monotonic time operations when running under Python runtimes older than 3.3. Since we now only support versions higher than this, this third party package requirement can now be removed. Change-Id: I809de2f6fe257c80de7c81f9e08499a919f52ff8 Signed-off-by: Sean McGinnis --- lower-constraints.txt | 1 - os_win/utils/jobutils.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index 2249d872..23452749 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -21,7 +21,6 @@ linecache2==1.0.0 MarkupSafe==1.0 mccabe==0.2.1 mock==2.0.0 -monotonic==0.6 mox3==0.20.0 msgpack-python==0.4.0 netaddr==0.7.18 diff --git a/os_win/utils/jobutils.py b/os_win/utils/jobutils.py index 1087df69..904f7629 100644 --- a/os_win/utils/jobutils.py +++ b/os_win/utils/jobutils.py @@ -20,7 +20,6 @@ Base Utility class for operations on Hyper-V. import time -import monotonic from oslo_log import log as logging from os_win import _utils @@ -89,7 +88,7 @@ class JobUtils(baseutils.BaseUtilsVirt): report_interval = 5 while not self._is_job_completed(job): - now = monotonic.monotonic() + now = time.monotonic() if now - last_report_time > report_interval: job_details = self._get_job_details(job) LOG.debug("Waiting for WMI job: %s.", job_details)