mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 17:12:03 +00:00
Fix style (got tired of it)
This commit is contained in:
parent
ec0bfa7bcf
commit
99a5ca2646
@ -2,7 +2,6 @@
|
||||
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import json
|
||||
import logging
|
||||
|
@ -10,12 +10,14 @@ import os
|
||||
# it finishes. stderr and stdout will be redirected both to specified file and
|
||||
# stdout.
|
||||
class TeePopen:
|
||||
# pylint: disable=W0102
|
||||
def __init__(self, command, log_file, env=os.environ.copy()):
|
||||
self.command = command
|
||||
self.log_file = log_file
|
||||
self.env = env
|
||||
|
||||
def __enter__(self):
|
||||
# pylint: disable=W0201
|
||||
self.process = Popen(self.command, shell=True, universal_newlines=True, env=self.env, stderr=STDOUT, stdout=PIPE, bufsize=1)
|
||||
self.log_file = open(self.log_file, 'w', encoding='utf-8')
|
||||
return self
|
||||
|
Loading…
Reference in New Issue
Block a user