diff --git a/opencore_legacy_patcher/support/validation.py b/opencore_legacy_patcher/support/validation.py index be531bbf9..fc68969cb 100644 --- a/opencore_legacy_patcher/support/validation.py +++ b/opencore_legacy_patcher/support/validation.py @@ -132,11 +132,8 @@ class PatcherValidation: if install_type in patchset[patch_subject][patch_core]: for install_directory in patchset[patch_subject][patch_core][install_type]: for install_file in patchset[patch_subject][patch_core][install_type][install_directory]: - try: - if patchset[patch_subject][patch_core][install_type][install_directory][install_file] in sys_patch_dict.DynamicPatchset: - continue - except TypeError: - pass + if patchset[patch_subject][patch_core][install_type][install_directory][install_file] in sys_patch_dict.DynamicPatchset: + continue source_file = str(self.constants.payload_local_binaries_root_path) + "/" + patchset[patch_subject][patch_core][install_type][install_directory][install_file] + install_directory + "/" + install_file if not Path(source_file).exists(): logging.info(f"File not found: {source_file}") diff --git a/opencore_legacy_patcher/sys_patch/sys_patch.py b/opencore_legacy_patcher/sys_patch/sys_patch.py index e719b9b8e..60f352db2 100644 --- a/opencore_legacy_patcher/sys_patch/sys_patch.py +++ b/opencore_legacy_patcher/sys_patch/sys_patch.py @@ -495,11 +495,8 @@ class PatchSysVolume: continue for install_patch_directory in required_patches[patch][method_type]: for install_file in required_patches[patch][method_type][install_patch_directory]: - try: - if required_patches[patch][method_type][install_patch_directory][install_file] in sys_patch_dict.DynamicPatchset: - required_patches[patch][method_type][install_patch_directory][install_file] = self._resolve_dynamic_patchset(required_patches[patch][method_type][install_patch_directory][install_file]) - except TypeError: - pass + if required_patches[patch][method_type][install_patch_directory][install_file] in sys_patch_dict.DynamicPatchset: + required_patches[patch][method_type][install_patch_directory][install_file] = self._resolve_dynamic_patchset(required_patches[patch][method_type][install_patch_directory][install_file]) source_file = required_patches[patch][method_type][install_patch_directory][install_file] + install_patch_directory + "/" + install_file