Update docstrings
This commit is contained in:
parent
d03db8f8ad
commit
8764399e2b
@ -35,7 +35,7 @@ def toggle(element_id):
|
|||||||
|
|
||||||
|
|
||||||
def error(msg):
|
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 = document.getElementById('notify_box')
|
||||||
notify_box.style.display = 'block'
|
notify_box.style.display = 'block'
|
||||||
notification = document.createElement('div')
|
notification = document.createElement('div')
|
||||||
@ -45,7 +45,7 @@ def error(msg):
|
|||||||
|
|
||||||
|
|
||||||
def warning(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 = document.getElementById('notify_box')
|
||||||
notify_box.style.display = 'block'
|
notify_box.style.display = 'block'
|
||||||
notification = document.createElement('div')
|
notification = document.createElement('div')
|
||||||
@ -55,6 +55,8 @@ def warning(msg):
|
|||||||
|
|
||||||
|
|
||||||
class OOM(object):
|
class OOM(object):
|
||||||
|
"""Hold OOM object and provide access"""
|
||||||
|
|
||||||
REC_TIMESTAMP = re.compile(
|
REC_TIMESTAMP = re.compile(
|
||||||
r'('
|
r'('
|
||||||
r'\[\s+\d+\.\d+\]'
|
r'\[\s+\d+\.\d+\]'
|
||||||
@ -63,11 +65,17 @@ class OOM(object):
|
|||||||
r') ', re.ASCII)
|
r') ', re.ASCII)
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
|
"""Zero based index of the current line in self.lines"""
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
|
"""OOM text as list of lines"""
|
||||||
|
|
||||||
state = "unknown"
|
state = "unknown"
|
||||||
"""State of the OOM after initial parsing"""
|
"""State of the OOM after initial parsing"""
|
||||||
|
|
||||||
|
text = ""
|
||||||
|
"""OOM as text"""
|
||||||
|
|
||||||
def __init__(self, text):
|
def __init__(self, text):
|
||||||
# use Unix LF only
|
# use Unix LF only
|
||||||
text = text.replace('\r\n', '\r')
|
text = text.replace('\r\n', '\r')
|
||||||
|
Loading…
Reference in New Issue
Block a user