Revision 0b5303da lib/cmdlib.py
b/lib/cmdlib.py | ||
---|---|---|
1233 | 1233 |
ETYPE_ERROR = "ERROR" |
1234 | 1234 |
ETYPE_WARNING = "WARNING" |
1235 | 1235 |
|
1236 |
_HOOKS_INDENT_RE = re.compile("^", re.M) |
|
1237 |
|
|
1236 | 1238 |
class NodeImage(object): |
1237 | 1239 |
"""A class representing the logical and physical status of a node. |
1238 | 1240 |
|
... | ... | |
2267 | 2269 |
# their results |
2268 | 2270 |
if phase == constants.HOOKS_PHASE_POST: |
2269 | 2271 |
# Used to change hooks' output to proper indentation |
2270 |
indent_re = re.compile('^', re.M) |
|
2271 | 2272 |
feedback_fn("* Hooks Results") |
2272 | 2273 |
assert hooks_results, "invalid result from hooks" |
2273 | 2274 |
|
... | ... | |
2288 | 2289 |
self._ErrorIf(test, self.ENODEHOOKS, node_name, |
2289 | 2290 |
"Script %s failed, output:", script) |
2290 | 2291 |
if test: |
2291 |
output = indent_re.sub(' ', output)
|
|
2292 |
output = self._HOOKS_INDENT_RE.sub(' ', output)
|
|
2292 | 2293 |
feedback_fn("%s" % output) |
2293 | 2294 |
lu_result = 0 |
2294 | 2295 |
|
Also available in: Unified diff