aboutsummaryrefslogtreecommitdiff
path: root/jobstate.py
diff options
context:
space:
mode:
Diffstat (limited to 'jobstate.py')
-rw-r--r--jobstate.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/jobstate.py b/jobstate.py
index 4df0de0..ba5e205 100644
--- a/jobstate.py
+++ b/jobstate.py
@@ -8,6 +8,8 @@ class JobState:
def __init__(self, name):
self.name = name
self.CurrentStateSuccess = True
+ self.FirstFailureTime = 0
+ self.LastNotifyTime = 0
def markFailedAndNotify(self):
if self.CurrentStateSuccess:
@@ -38,12 +40,12 @@ class JobState:
ret = self.name + "|"
ret += "Succeeding" if self.CurrentStateSuccess else "Failing"
ret += "|" + str(self.FirstFailureTime)
- ret += "|" + str(self.LastNotifyTime)
+ ret += "|" + str(self.LastNotifyTime) + "\n"
return ret
@staticmethod
def Parse(line):
- s = JobState()
+ s = JobState("")
line = line.strip()
parts = line.split("|")
@@ -58,4 +60,4 @@ class JobState:
@staticmethod
def Empty(name):
s = JobState(name)
- return s \ No newline at end of file
+ return s