"tests/pipelines/vscode:/vscode.git/clone" did not exist on "491a933a1bf79d1f9cd3bc5903fc609ae6d6a9ac"
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: ...@@ -33,7 +33,7 @@ jobs:
displayName: 'Built-in tuners / assessors tests' displayName: 'Built-in tuners / assessors tests'
- script: | - script: |
cd test 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' displayName: 'Examples and advanced features tests on local machine'
- script: | - script: |
cd test cd test
......
...@@ -44,13 +44,10 @@ _time_format = '%Y-%m-%d %H:%M:%S' ...@@ -44,13 +44,10 @@ _time_format = '%Y-%m-%d %H:%M:%S'
class _LoggerFileWrapper(TextIOBase): class _LoggerFileWrapper(TextIOBase):
def __init__(self, logger_file): def __init__(self, logger_file):
self.file = logger_file self.file = logger_file
self.orig_stdout = sys.stdout
def write(self, s): def write(self, s):
if s != '\n': if s != '\n':
time = datetime.now().strftime(_time_format) 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.write('[{}] PRINT '.format(time) + s + '\n')
self.file.flush() self.file.flush()
return len(s) 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