Skip to content

Commit 4fcf81d

Browse files
author
Nathan Lee
committed
Added stdout/stderr redirect for all workers
1 parent 734fa06 commit 4fcf81d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pyrunner/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.2.3'
1+
__version__ = '4.2.4'

pyrunner/worker/abstract.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17-
import traceback
17+
import traceback, sys
1818

1919
import pyrunner.logger.file as lg
2020

@@ -57,6 +57,9 @@ def protected_run(self):
5757
methods, if defined.
5858
"""
5959

60+
sys.stdout = open(self.logfile, 'a')
61+
sys.stderr = open(self.logfile, 'a')
62+
6063
# RUN
6164
try:
6265
self.retcode = self.run() or self.retcode

0 commit comments

Comments
 (0)