BOM-2477: pylint warnings lint-amnesty (#27585)
This commit is contained in:
@@ -36,11 +36,11 @@ def run_multi_processes(cmd_list, out_log=None, err_log=None):
|
||||
pids = []
|
||||
|
||||
if out_log:
|
||||
out_log_file = open(out_log, 'w')
|
||||
out_log_file = open(out_log, 'w') # lint-amnesty, pylint: disable=consider-using-with
|
||||
kwargs['stdout'] = out_log_file
|
||||
|
||||
if err_log:
|
||||
err_log_file = open(err_log, 'w')
|
||||
err_log_file = open(err_log, 'w') # lint-amnesty, pylint: disable=consider-using-with
|
||||
kwargs['stderr'] = err_log_file
|
||||
|
||||
# If the user is performing a dry run of a task, then just log
|
||||
@@ -93,14 +93,14 @@ def run_background_process(cmd, out_log=None, err_log=None, cwd=None):
|
||||
|
||||
kwargs = {'shell': True, 'cwd': cwd}
|
||||
if out_log:
|
||||
out_log_file = open(out_log, 'w')
|
||||
out_log_file = open(out_log, 'w') # lint-amnesty, pylint: disable=consider-using-with
|
||||
kwargs['stdout'] = out_log_file
|
||||
|
||||
if err_log:
|
||||
err_log_file = open(err_log, 'w')
|
||||
err_log_file = open(err_log, 'w') # lint-amnesty, pylint: disable=consider-using-with
|
||||
kwargs['stderr'] = err_log_file
|
||||
|
||||
proc = subprocess.Popen(cmd, **kwargs)
|
||||
proc = subprocess.Popen(cmd, **kwargs) # lint-amnesty, pylint: disable=consider-using-with
|
||||
|
||||
def exit_handler():
|
||||
"""
|
||||
|
||||
@@ -99,7 +99,7 @@ class TestSuite:
|
||||
process = None
|
||||
|
||||
try:
|
||||
process = subprocess.Popen(cmd, **kwargs)
|
||||
process = subprocess.Popen(cmd, **kwargs) # lint-amnesty, pylint: disable=consider-using-with
|
||||
return self.is_success(process.wait())
|
||||
except KeyboardInterrupt:
|
||||
kill_process(process)
|
||||
|
||||
Reference in New Issue
Block a user