Skip to content

Commit bf1a539

Browse files
author
Yury Krasouski
committed
add force stderr flush
1 parent c7dab06 commit bf1a539

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pytest_reportportal/service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import sys
23
import traceback
34
from time import time
45

@@ -60,9 +61,10 @@ def async_error_handler(self, exc_info):
6061
def _stop_if_neccessary(self):
6162
try:
6263
exc, msg, tb = self._errors.get(False)
63-
err = traceback.format_exception(exc, msg, tb)
64+
traceback.print_exception(exc, msg, tb)
65+
sys.stderr.flush()
6466
if not self.ignore_errors:
65-
pytest.exit("".join(err))
67+
pytest.exit(msg)
6668
except queue.Empty:
6769
pass
6870

0 commit comments

Comments
 (0)