Skip to content

Commit 4ab5548

Browse files
author
Tom Reitz
committed
clarify shutdown comment per suggestion from John
1 parent b7224e7 commit 4ab5548

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lightbeam/lightbeam.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ def __init__(self, config_file, logger=None, selector="*", exclude="", keep_keys
129129
"resources": {}
130130
}
131131

132+
# this is intended to be called before any CRITICAL errors;
133+
# any cleanup tasks should go here:
134+
def shutdown(self, method):
135+
self.write_structured_output(method)
136+
132137
# helper function used below
133138
def replace_linebreaks(self, m):
134139
return re.sub(r"\s+", '', m.group(0))
135140

136-
def shutdown(self, method):
137-
# this is called before any CRITICAL errors;
138-
# any cleanup tasks should go here:
139-
self.write_structured_output(method)
140-
141141
def write_structured_output(self, command):
142142
### Create structured output results_file if necessary
143143
self.end_timestamp = datetime.now()

0 commit comments

Comments
 (0)