python-fasteners/fasteners-monotonic.patch
Matthias Runge 528d2fd96a Use time.monotonic if available (Python3 > 3.2)
Resolves: rhbz#1294335
2016-08-29 08:33:29 +02:00

17 lines
397 B
Diff

diff --git a/fasteners/_utils.py b/fasteners/_utils.py
index c5418d7..e0eff38 100644
--- a/fasteners/_utils.py
+++ b/fasteners/_utils.py
@@ -19,7 +19,10 @@
import logging
import time
-from monotonic import monotonic as now # noqa
+try:
+ from time import monotonic as now
+except ImportError:
+ from monotonic import monotonic as now
# log level for low-level debugging
BLATHER = 5