Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Commit 4d79df1

Browse files
committed
Error out if key is missing
1 parent 20e887d commit 4d79df1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pywii/Common/pywii/wii.py

+2
Original file line numberDiff line numberDiff line change
@@ -1501,6 +1501,8 @@ def __init__(self, file, tmd, tik, certs, footer, nandwad=False):
15011501
self.data_off = self.f.tell()
15021502

15031503
def adddata(self, data, cid):
1504+
if self.tik.title_key is None:
1505+
raise Exception("Required key is not available")
15041506
i = self.tmd.find_cr_by_cid(cid)
15051507
cr = self.tmd.get_content_records()[i]
15061508
cr.sha = SHA.new(data).digest()

0 commit comments

Comments
 (0)