aboutsummaryrefslogtreecommitdiff
path: root/jobs
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-01-31 17:20:05 -0500
committerTom Ritter <tom@ritter.vg>2016-01-31 17:36:13 -0500
commit2fe68bac48427e687888fb8de13eea541d531610 (patch)
tree8f201b06840131b0ccfa1831f59bd1ac35471922 /jobs
parente7c15ef06e7886f69cee15863d7f75dc75c9ecec (diff)
Fix the super() calling
Diffstat (limited to 'jobs')
-rwxr-xr-xjobs/HTTPServerChecker.py2
-rwxr-xr-xjobs/JobBase.py4
-rwxr-xr-xjobs/PeerChecker.py2
-rwxr-xr-xjobs/TCPServerChecker.py2
4 files changed, 5 insertions, 5 deletions
diff --git a/jobs/HTTPServerChecker.py b/jobs/HTTPServerChecker.py
index 965e977..e590486 100755
--- a/jobs/HTTPServerChecker.py
+++ b/jobs/HTTPServerChecker.py
@@ -14,11 +14,11 @@ class HTTPServerChecker(JobSpawner.JobSpawner):
class ServerChecker(JobBase.JobBase):
def __init__(self, config, url, frequency, failureNotificationFrequency):
- JobBase.JobBase.__init__(self, config, url, frequency, failureNotificationFrequency)
self.config = config
self.url = url
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
+ super(HTTPServerChecker.ServerChecker, self).__init__(config, url, frequency, failureNotificationFrequency)
def getName(self):
return str(self.__class__) + " for " + self.url
diff --git a/jobs/JobBase.py b/jobs/JobBase.py
index 416f28d..427dd17 100755
--- a/jobs/JobBase.py
+++ b/jobs/JobBase.py
@@ -21,10 +21,10 @@ class JobFailureNotificationFrequency:
EVERYHOUR = "hour"
ONSTATECHANGE = "state_change"
-class JobBase:
+class JobBase(object):
def __init__(self, config, *args):
self.config = config
- self.stateName = hashlib.sha1(self.getName() + "|" + "|".join(args)).hexdigest()
+ self.stateName = hashlib.sha1(self.getName() + "|" + "|".join([str(a) for a in args])).hexdigest()
""" Return a friendly name to identify this Job"""
def getName(self):
diff --git a/jobs/PeerChecker.py b/jobs/PeerChecker.py
index d271419..8d0a6b7 100755
--- a/jobs/PeerChecker.py
+++ b/jobs/PeerChecker.py
@@ -13,9 +13,9 @@ import JobSpawner
class PeerChecker(JobSpawner.JobSpawner):
class IndividualPeerChecker(JobBase.JobBase):
def __init__(self, config, checkurl, notificationAddress):
- JobBase.JobBase.__init__(self, config, checkurl, notificationAddress)
self.checkurl = checkurl
self.notificationAddress = notificationAddress
+ super(PeerChecker.IndividualPeerChecker, self).__init__(config, checkurl, notificationAddress)
def executeEvery(self):
return JobBase.JobFrequency.HOUR
diff --git a/jobs/TCPServerChecker.py b/jobs/TCPServerChecker.py
index bdb914c..eaf6704 100755
--- a/jobs/TCPServerChecker.py
+++ b/jobs/TCPServerChecker.py
@@ -14,13 +14,13 @@ class TCPServerChecker(JobSpawner.JobSpawner):
class ServerChecker(JobBase.JobBase):
def __init__(self, config, ip, port, friendlyName, frequency, failureNotificationFrequency):
- JobBase.JobBase.__init__(self, config, ip, port, friendlyName, frequency, failureNotificationFrequency)
self.config = config
self.ip = ip
self.port = port
self.friendlyName = friendlyName + "(" + self.ip + ":" + str(self.port) + ")"
self.frequency = frequency
self.failureNotificationFrequency = failureNotificationFrequency
+ super(TCPServerChecker.ServerChecker, self).__init__(config, ip, port, friendlyName, frequency, failureNotificationFrequency)
def getName(self):
return str(self.__class__) + " for " + self.friendlyName