Fix style (got tired of it)

This commit is contained in:
alesapin 2021-12-03 12:19:39 +03:00
parent ec0bfa7bcf
commit 99a5ca2646
2 changed files with 2 additions and 1 deletions

View File

@ -2,7 +2,6 @@
# pylint: disable=line-too-long
import subprocess
import os
import json
import logging

View File

@ -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