From 7b7a3fbf510228459411d7ddff5290d223f3c9b3 Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:11:57 -0400 Subject: [PATCH] Return FileNotFoundError if path doesn't exist in pack_u8() --- pyproject.toml | 2 +- src/libWiiPy/archive/u8.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9d9a3c3..b19275a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "libWiiPy" -version = "0.3.0" +version = "0.3.1" authors = [ { name="NinjaCheetah", email="ninjacheetah@ncxprogramming.com" }, { name="Lillian Skinner", email="lillian@randommeaninglesscharacters.com" } diff --git a/src/libWiiPy/archive/u8.py b/src/libWiiPy/archive/u8.py index 97c9fc2..f7c4de8 100644 --- a/src/libWiiPy/archive/u8.py +++ b/src/libWiiPy/archive/u8.py @@ -303,3 +303,5 @@ def pack_u8(input_path) -> bytes: u8_archive.u8_node_list.append(U8Node(256, 0, 0, 2)) u8_archive.u8_node_list.append(U8Node(0, 1, 0, len(file_data))) return u8_archive.dump() + else: + raise FileNotFoundError("Input file/directory: \"" + str(input_path) + "\" does not exist!")