From 8764399e2bf1c39abe7e0c460cffab758e2aae1a Mon Sep 17 00:00:00 2001 From: Carsten Grohmann Date: Mon, 27 Aug 2018 19:58:43 +0200 Subject: [PATCH] Update docstrings --- OOMAnalyser.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/OOMAnalyser.py b/OOMAnalyser.py index 6abc2b4..4a4bdd6 100644 --- a/OOMAnalyser.py +++ b/OOMAnalyser.py @@ -35,7 +35,7 @@ def toggle(element_id): def error(msg): - """Unhide the error box and add the error message""" + """Show the error box and add the error message""" notify_box = document.getElementById('notify_box') notify_box.style.display = 'block' notification = document.createElement('div') @@ -45,7 +45,7 @@ def error(msg): def warning(msg): - """Unhide the error box and add the warning message""" + """Show the error box and add the warning message""" notify_box = document.getElementById('notify_box') notify_box.style.display = 'block' notification = document.createElement('div') @@ -55,6 +55,8 @@ def warning(msg): class OOM(object): + """Hold OOM object and provide access""" + REC_TIMESTAMP = re.compile( r'(' r'\[\s+\d+\.\d+\]' @@ -63,11 +65,17 @@ class OOM(object): r') ', re.ASCII) i = 0 + """Zero based index of the current line in self.lines""" + lines = [] + """OOM text as list of lines""" state = "unknown" """State of the OOM after initial parsing""" + text = "" + """OOM as text""" + def __init__(self, text): # use Unix LF only text = text.replace('\r\n', '\r')