small amend (avoid possible error by close of not existing pipe)

pull/2638/head
sebres 2020-02-25 15:06:04 +01:00
parent df885586d4
commit 6c6cf2a956
1 changed files with 3 additions and 2 deletions

View File

@ -270,8 +270,9 @@ class Utils():
if stderr is not None and stderr != '' and std_level >= logSys.getEffectiveLevel():
for l in stderr.splitlines():
logSys.log(std_level, "%x -- stderr: %r", realCmdId, uni_decode(l))
popen.stdout.close()
popen.stderr.close()
if popen.stdout: popen.stdout.close()
if popen.stderr: popen.stderr.close()
success = False
if retcode in success_codes: