From dcd581345a7903ddc032569156d688cccf5e79ba Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Fri, 2 Sep 2022 09:45:08 -0600 Subject: [PATCH] sys_patch_helpers: Add Commit URL to patch file --- resources/device_probe.py | 8 +++++--- resources/sys_patch_helpers.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/device_probe.py b/resources/device_probe.py index b7f443374..775af8730 100644 --- a/resources/device_probe.py +++ b/resources/device_probe.py @@ -482,6 +482,7 @@ class Computer: secure_boot_policy: Optional[int] = None oclp_sys_version: Optional[str] = None oclp_sys_date: Optional[str] = None + oclp_sys_url: Optional[str] = None firmware_vendor: Optional[str] = None @staticmethod @@ -756,8 +757,9 @@ class Computer: if path.exists(): sys_plist = plistlib.load(path.open("rb")) if sys_plist: - try: + if "OpenCore Legacy Patcher" in sys_plist: self.oclp_sys_version = sys_plist["OpenCore Legacy Patcher"] + if "Time Patched" in sys_plist: self.oclp_sys_date = sys_plist["Time Patched"] - except KeyError: - pass \ No newline at end of file + if "Commit URL" in sys_plist: + self.oclp_sys_url = sys_plist["Commit URL"] \ No newline at end of file diff --git a/resources/sys_patch_helpers.py b/resources/sys_patch_helpers.py index 51815c35c..1661e58b4 100644 --- a/resources/sys_patch_helpers.py +++ b/resources/sys_patch_helpers.py @@ -56,6 +56,7 @@ class sys_patch_helpers: "OpenCore Legacy Patcher": f"v{self.constants.patcher_version}", "PatcherSupportPkg": f"v{self.constants.patcher_support_pkg_version}", "Time Patched": f"{datetime.now().strftime('%B %d, %Y @ %H:%M:%S')}", + "Commit URL": f"{self.constants.commit_info[2]}" } data.update(patchset) if Path(source_path_file).exists():