Unverified Commit 2f01a4cd authored by chicm-ms's avatar chicm-ms Committed by GitHub
Browse files

Fix broken pipe v0.5.1 (#679)

* Fix broken pipe error

* updates
parent bc9eab33
......@@ -33,7 +33,7 @@ jobs:
displayName: 'Built-in tuners / assessors tests'
- script: |
cd test
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local
PATH=$HOME/.local/bin:$PATH python3 config_test.py --ts local --local_gpu
displayName: 'Examples and advanced features tests on local machine'
- script: |
cd test
......
......@@ -44,13 +44,10 @@ _time_format = '%Y-%m-%d %H:%M:%S'
class _LoggerFileWrapper(TextIOBase):
def __init__(self, logger_file):
self.file = logger_file
self.orig_stdout = sys.stdout
def write(self, s):
if s != '\n':
time = datetime.now().strftime(_time_format)
self.orig_stdout.write(s + '\n')
self.orig_stdout.flush()
self.file.write('[{}] PRINT '.format(time) + s + '\n')
self.file.flush()
return len(s)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment