From ac7ea2ebfac34c370aeeec979e10ae8a423f6813 Mon Sep 17 00:00:00 2001 From: fadebowaley Date: Thu, 9 Mar 2023 12:24:31 +0100 Subject: [PATCH] Replace general exception with specific one #3337 --- .gitignore | 1 + bugbug/model.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 116cd87bce..065ad77185 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ share/python-wheels/ MANIFEST cache/ node_modules/ +buggy/ # Logs *.log diff --git a/bugbug/model.py b/bugbug/model.py index a004bf5d55..cfb059af40 100644 --- a/bugbug/model.py +++ b/bugbug/model.py @@ -189,7 +189,8 @@ def get_human_readable_feature_names(self): elif type_ == "text": feature_name = f"Combined text contains '{feature_name}'" elif type_ not in ("data", "couple_data"): - raise Exception(f"Unexpected feature type for: {full_feature_name}") + raise ValueError(f"Unexpected feature type for: {full_feature_name}") + cleaned_feature_names.append(feature_name)