def evaluate_stop_condition(errdata, stop_condition):
if stop_condition:<EOL><INDENT>return_code = stop_condition(list(errdata))<EOL>if return_code != -<NUM_LIT:1>:<EOL><INDENT>log.info(<EOL>'<STR_LIT>',<EOL>extra=dict(return_code=return_code))<EOL>sys.exit(return_code)<EOL><DEDENT><DEDENT>
Call the user-defined function: stop_condition(errdata)
If the function returns -1, do nothing.  Otherwise, sys.exit.