aboutsummaryrefslogtreecommitdiff
path: root/samplejobs
diff options
context:
space:
mode:
Diffstat (limited to 'samplejobs')
-rwxr-xr-xsamplejobs/BWAuthChecker.py5
-rwxr-xr-xsamplejobs/MetricsChecker.py1
2 files changed, 5 insertions, 1 deletions
diff --git a/samplejobs/BWAuthChecker.py b/samplejobs/BWAuthChecker.py
index 618075e..ff59516 100755
--- a/samplejobs/BWAuthChecker.py
+++ b/samplejobs/BWAuthChecker.py
@@ -1,5 +1,8 @@
#!/usr/bin/env python
+from __future__ import division
+from builtins import str
+from past.utils import old_div
import os
import re
import time
@@ -29,7 +32,7 @@ class BWAuthChecker(JobBase.JobBase):
now = datetime.datetime.utcfromtimestamp(time.time())
if now - then > datetime.timedelta(hours=4):
body = "The bandwidth file is more than 4 hours old.\n"
- body += str((now-then).seconds / 60) + " minutes old.\n"
+ body += str(old_div((now-then).seconds, 60)) + " minutes old.\n"
elif len(lines) < 8300:
body = "The bandwidth file has a low number of relays: " + str(len(lines)) + "\n"
except Exception as e:
diff --git a/samplejobs/MetricsChecker.py b/samplejobs/MetricsChecker.py
index 762e46f..c0254b3 100755
--- a/samplejobs/MetricsChecker.py
+++ b/samplejobs/MetricsChecker.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
+from builtins import str
import os
import base64
import logging