From cda7aece9ca05ca502005c23f98b0d636fff1b31 Mon Sep 17 00:00:00 2001 From: Marc Chen Date: Wed, 30 Oct 2024 08:42:54 +0800 Subject: [PATCH] Fix MfciPolicy.py syntax error (#606) ## Description Fix a syntax error in MfciPolicy.py while using pyinstaller to generate executable file. ![image](https://github.com/user-attachments/assets/2c3fec6b-1732-4860-b52b-c86740cbfb2e) For details on how to complete these options and their meaning refer to [CONTRIBUTING.md](https://github.com/microsoft/mu/blob/HEAD/CONTRIBUTING.md). - [x] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested Verified the MfciPolicy.exe can be generated by pyinstaller successfully. Verified the system info can be dumped as below ![image](https://github.com/user-attachments/assets/0ef74028-28c0-4408-8b8a-b88b4ff5dedb) ## Integration Instructions N/A --- MfciPkg/Application/MfciPolicy/MfciPolicy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MfciPkg/Application/MfciPolicy/MfciPolicy.py b/MfciPkg/Application/MfciPolicy/MfciPolicy.py index 9a00266985..a271bf4a8e 100644 --- a/MfciPkg/Application/MfciPolicy/MfciPolicy.py +++ b/MfciPkg/Application/MfciPolicy/MfciPolicy.py @@ -84,7 +84,7 @@ def get_system_info(): if Variable == "NextMfciPolicyNonce" or Variable == "CurrentMfciPolicyNonce": print(f" {Variable} = {hex(int.from_bytes(data, byteorder='little', signed=False))}") else: - print(f" {Variable} = \"{data.decode("utf16")[0:-1]}\"") + print(f" {Variable} = '{data.decode('utf16')[0:-1]}'") return