diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index 063a3ce9f..1531806e5 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -206,12 +206,12 @@ def blackbox_crash_main(args, unknown_args): while True: line = child.stderr.readline().strip() - if line != '' and not line.startswith('WARNING'): + if line == '': + break + elif not line.startswith('WARNING'): run_had_errors = True print('stderr has error message:') print('***' + line + '***') - else: - break if run_had_errors: sys.exit(2)