Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Commit

Permalink
Improvement to rules.txt exception
Browse files Browse the repository at this point in the history
  • Loading branch information
NiceneNerd committed Sep 23, 2019
1 parent d390015 commit 4f54241
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bcml/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 4f54241

Please sign in to comment.