sys_patch_helpers.py: Verify stderr before printing

This commit is contained in:
Mykola Grymalyuk
2023-01-23 09:52:24 -07:00
parent e8a6f45329
commit 288b827616

View File

@@ -94,8 +94,8 @@ class sys_patch_helpers:
if result.returncode != 0:
print("- Failed to install KDK:")
print(result.stdout.decode('utf-8'))
print(result.stderr.decode('utf-8'))
if result.stderr:
print(result.stderr.decode('utf-8'))
utilities.elevated(["hdiutil", "detach", mount_point], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
raise Exception("Failed to install KDK")
utilities.process_status(utilities.elevated(["rm", kdk_dst_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT))