microsoft / mu_feature_config

Project Mu - Feature Repo - UEFI User Config and Management Support
https://microsoft.github.io/mu/
Other
19 stars 24 forks source link

UpdateConfigHdr: Gracefully exit when filepath is `None` #378

Closed Javagedes closed 2 months ago

Javagedes commented 2 months ago

Description

GetAbsolutePathOnThisSystemFromEdk2RelativePath will log an error message and return None if absolute path could not be determined. Due to this, file should be checked against None, not os.path.isfile.

You can see that in the GetAbsolutePathOnThisSystemFromEdk2RelativePath that we return a str if the absolute path is found, else None.

Currently, when a path is not found, you get this exception and trace:

image

How This Was Tested

N/A

Integration Instructions

N/A