From 4f54241e4368c6a2091e2170f002015382df3318 Mon Sep 17 00:00:00 2001 From: Caleb Smith Date: Mon, 23 Sep 2019 06:23:27 -0500 Subject: [PATCH] Improvement to rules.txt exception --- bcml/install.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bcml/install.py b/bcml/install.py index ba32d13b..1a556a2a 100644 --- a/bcml/install.py +++ b/bcml/install.py @@ -44,8 +44,7 @@ def open_mod(path: Path) -> Path: subprocess.run(x_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, creationflags=util.CREATE_NO_WINDOW) else: - raise Exception( - 'The mod provided was not a supported archive (BNP, ZIP, RAR, or 7z).') + raise Exception('The mod provided was not a supported archive (BNP, ZIP, RAR, or 7z).') if not tmpdir.exists(): raise Exception('No files were extracted.') rulesdir = tmpdir @@ -57,7 +56,7 @@ def open_mod(path: Path) -> Path: found_rules = True break if not found_rules: - raise Exception('No rules.txt was found in this mod.') + raise FileNotFoundError(f'No rules.txt was found in "{path.name}".') return rulesdir