From 7e5e93e9cd117068f7f7ff6126863a7b0e01c282 Mon Sep 17 00:00:00 2001 From: Peter Kruse Date: Sun, 3 Dec 2023 19:10:18 +0100 Subject: [PATCH] appease mypy --- bloodytools/utils/simc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bloodytools/utils/simc.py b/bloodytools/utils/simc.py index 7d3f152..5464262 100644 --- a/bloodytools/utils/simc.py +++ b/bloodytools/utils/simc.py @@ -18,5 +18,8 @@ def get_simc_hash(executable_path: str) -> str: ).stdout # Extract git hash from build version, which looks like # SimulationCraft 1015-01 for World of Warcraft 10.1.7.51536 Live (hotfix 2023-09-27/51536, git build dragonflight d90d5c5) - simc_hash = re.search(r"git build \w+ ([^\)]+)", simc_output).group(1) - return simc_hash + search = re.search(r"git build \w+ ([^\)]+)", simc_output) + if not search: + raise ValueError("SimulationCraft version could not get extracted") + simc_hash = search.group(1) + return str(simc_hash)