Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
dcapwell committed Oct 8, 2020
1 parent 9d6c034 commit 3f41f65
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions ccmlib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,9 @@ def print_process_output(self, name, proc, verbose=False):
# This will return when exprs are found or it timeouts
def watch_log_for(self, exprs, from_mark=None, timeout=600, process=None, verbose=False, filename='system.log'):
"""
Watch the log until one or more (regular) expression are found.
This methods when all the expressions have been found or the method
timeouts (a TimeoutError is then raised). On successful completion,
a list of pair (line matched, match object) is returned.
Watch the log until one or more (regular) expressions are found or timeouts (a
TimeoutError is then raised). On successful completion, a list of pair (line matched,
match object) is returned.
"""
start = time.time()
tofind = [exprs] if isinstance(exprs, string_types) else exprs
Expand Down Expand Up @@ -561,13 +560,12 @@ def watch_log_for(self, exprs, from_mark=None, timeout=600, process=None, verbos

def watch_log_for_no_errors(self, exprs, from_mark=None, timeout=600, process=None, verbose=False, filename='system.log'):
"""
Watch the log until one or more (regular) expression are found.
This methods when all the expressions have been found or the method
timeouts (a TimeoutError is then raised). On successful completion,
a list of pair (line matched, match object) is returned.
Watch the log until one or more (regular) expressions are found or timeouts (a
TimeoutError is then raised). On successful completion, a list of pair (line matched,
match object) is returned.
This method is different from watch_log_for since it will fail if
any errors are found.
This method is different from watch_log_for as it will raise a AssertionError if the
log contain an error; this assertion will contain the errors found in the log.
"""
start = time.time()
tofind = [exprs] if isinstance(exprs, string_types) else exprs
Expand Down

0 comments on commit 3f41f65

Please sign in to comment.