Fix problems detected by pylint 2.8.1.

This commit is contained in:
Alexander Arlt
2021-04-25 23:33:14 -05:00
parent eed0bf580b
commit 4e7dc24383
5 changed files with 127 additions and 127 deletions
+7 -7
View File
@@ -67,13 +67,13 @@ class regressor():
if not env:
env = os.environ.copy()
logfh = open(logfile, 'w')
proc = subprocess.Popen(command, shell=True, executable='/bin/bash',
env=env, stdout=logfh,
stderr=subprocess.STDOUT)
ret = proc.wait()
logfh.close()
return ret
with open(logfile, 'w') as logfh:
with subprocess.Popen(command, shell=True, executable='/bin/bash',
env=env, stdout=logfh,
stderr=subprocess.STDOUT) as proc:
ret = proc.wait()
logfh.close()
return ret
def process_log(self, logfile):
"""