From eec2f61469e4ec5450bd4a7eac55f0b2455aecbf Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Wed, 12 Jul 2023 15:53:40 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Handle=20updated=20patch=20name?= =?UTF-8?q?=20convention?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/parser.py | 1 + src/patches.py | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/parser.py b/src/parser.py index 0a72122..86dc6eb 100644 --- a/src/parser.py +++ b/src/parser.py @@ -49,6 +49,7 @@ class Parser(object): """Getter to get all excluded patches :return: List of excluded patches.""" try: + name = name.lower().replace(" ", "-") patch_index = self._PATCHES.index(name) indices = [i for i in range(len(self._PATCHES)) if self._PATCHES[i] == name] for patch_index in indices: diff --git a/src/patches.py b/src/patches.py index 311d8b3..e986541 100644 --- a/src/patches.py +++ b/src/patches.py @@ -179,9 +179,12 @@ class Patches(object): else: excluded_patches = self.config.env.list(f"EXCLUDE_PATCH_{app}".upper(), []) for patch in patches: - parser.include(patch["name"]) if patch[ - "name" - ] not in excluded_patches else parser.exclude(patch["name"]) + normalized_patch = patch["name"].lower().replace(" ", "-") + parser.include( + normalized_patch + ) if normalized_patch not in excluded_patches else parser.exclude( + normalized_patch + ) excluded = parser.get_excluded_patches() if excluded: logger.debug(f"Excluded patches {excluded} for {app}")