Also log complete raw stderr to file

develop
lethosor 2021-09-17 17:42:29 -04:00
parent b1854f251e
commit 1d0985d51a
No known key found for this signature in database
GPG Key ID: 76A269552F4F58C1
1 changed files with 3 additions and 1 deletions

@ -115,9 +115,11 @@ try:
out, err = process.communicate()
if err:
print('WARN: DF produced stderr: ' + repr(err[:5000]))
with open('df-raw-stderr.log', 'wb') as f:
f.write(err)
if process.returncode != 0:
print('ERROR: DF exited with ' + repr(process.returncode))
print('DF stdout: %r' + repr(out[:5000]))
print('DF stdout: ' + repr(out[:5000]))
finally:
print('\nRestoring original init.txt')
shutil.copyfile(init_txt_path + '.orig', init_txt_path)