diff --git a/src/libWiiPy/archive/u8.py b/src/libWiiPy/archive/u8.py index 6e79b44..3b0f812 100644 --- a/src/libWiiPy/archive/u8.py +++ b/src/libWiiPy/archive/u8.py @@ -285,7 +285,6 @@ def pack_u8(input_path) -> bytes: # subdirectory and file. Discard node_count and name_offset since we don't care about them here, as they're # really only necessary for the directory recursion. u8_archive, _, _ = _pack_u8_dir(u8_archive, input_path, node_count=1, name_offset=1) - # Dump and return the U8 file data. return u8_archive.dump() elif os.path.isfile(input_path): # Simple code to handle if a single file is provided as input. Not really sure *why* you'd do this, since the @@ -303,5 +302,4 @@ def pack_u8(input_path) -> bytes: # Append generic U8Node for the root, followed by the actual file's node. 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 the processed data. return u8_archive.dump() diff --git a/src/libWiiPy/title/content.py b/src/libWiiPy/title/content.py index c2a3392..fb7554d 100644 --- a/src/libWiiPy/title/content.py +++ b/src/libWiiPy/title/content.py @@ -89,7 +89,6 @@ class ContentRegion: content_region_data += content if padding_bytes > 0: content_region_data += b'\x00' * padding_bytes - # Return the raw ContentRegion for the data contained in the object. return content_region_data def get_enc_content_by_index(self, index: int) -> bytes: diff --git a/src/libWiiPy/title/ticket.py b/src/libWiiPy/title/ticket.py index 6e433b0..b81615a 100644 --- a/src/libWiiPy/title/ticket.py +++ b/src/libWiiPy/title/ticket.py @@ -200,7 +200,6 @@ class Ticket: title_limit_data += int.to_bytes(self.title_limits_list[title_limit].maximum_usage, 4) # Write the entry to the ticket. ticket_data += title_limit_data - # Return the raw TMD for the data contained in the object. return ticket_data def get_title_id(self) -> str: diff --git a/src/libWiiPy/title/title.py b/src/libWiiPy/title/title.py index d0d6690..5b5b5e7 100644 --- a/src/libWiiPy/title/title.py +++ b/src/libWiiPy/title/title.py @@ -79,9 +79,7 @@ class Title: self.wad.set_ticket_data(self.ticket.dump()) # Dump the ContentRegion and set it in the WAD. self.wad.set_content_data(self.content.dump()) - # Dump the WAD with the new regions back into raw data and return it. - wad_data = self.wad.dump() - return wad_data + return self.wad.dump() def load_tmd(self, tmd: bytes) -> None: """ diff --git a/src/libWiiPy/title/tmd.py b/src/libWiiPy/title/tmd.py index fd3c5cf..bdc0bfa 100644 --- a/src/libWiiPy/title/tmd.py +++ b/src/libWiiPy/title/tmd.py @@ -213,7 +213,6 @@ class TMD: content_data += binascii.unhexlify(self.content_records[content_record].content_hash) # Write the record to the TMD. tmd_data += content_data - # Return the raw TMD for the data contained in the object. return tmd_data def get_title_region(self) -> str: diff --git a/src/libWiiPy/title/wad.py b/src/libWiiPy/title/wad.py index 12ba493..9f86b57 100644 --- a/src/libWiiPy/title/wad.py +++ b/src/libWiiPy/title/wad.py @@ -178,7 +178,6 @@ class WAD: # Retrieve the content data and write it out. wad_data += self.get_content_data() wad_data = pad_bytes(wad_data) - # Return the raw WAD file for the data contained in the object. return wad_data def get_wad_type(self) -> str: