BOM-2477: pylint warnings lint-amnesty (#27585)

This commit is contained in:
Usama Sadiq
2021-05-11 17:22:40 +05:00
committed by GitHub
parent 156a1a80ee
commit 4f4be6538a
52 changed files with 67 additions and 69 deletions

View File

@@ -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():
"""

View File

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