Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Corrected problem with outage log not displaying outages longer than 24 hours. Thanks Irma
  • Loading branch information
jgyates authored Sep 13, 2017
1 parent 617bb19 commit 3fe6275
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions genmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -1673,9 +1673,14 @@ def DisplayOutageHistory(self, ToString = False):
if line[0] == "#": # comment?
continue
Items = line.split(",")
if len(Items) != 2:
if len(Items) != 2 and len(Items) != 3:
continue
OutageLog.insert(0, [Items[0], Items[1]])
if len(Items) == 3:
strDuration = Items[1] + "," + Items[2]
else:
strDuration = Items[1]

OutageLog.insert(0, [Items[0], strDuration])
if len(OutageLog) > 50: # limit log to 50 entries
OutageLog.pop()

Expand Down

0 comments on commit 3fe6275

Please sign in to comment.