From 4d79df1ca7b8a3d0817e4850f121f060cebb5632 Mon Sep 17 00:00:00 2001 From: Hector Martin Date: Sat, 29 Jul 2017 19:41:52 +0900 Subject: [PATCH] Error out if key is missing --- pywii/Common/pywii/wii.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pywii/Common/pywii/wii.py b/pywii/Common/pywii/wii.py index 9484d3a..4ef701a 100644 --- a/pywii/Common/pywii/wii.py +++ b/pywii/Common/pywii/wii.py @@ -1501,6 +1501,8 @@ class WiiWadMaker(WiiWad): self.data_off = self.f.tell() def adddata(self, data, cid): + if self.tik.title_key is None: + raise Exception("Required key is not available") i = self.tmd.find_cr_by_cid(cid) cr = self.tmd.get_content_records()[i] cr.sha = SHA.new(data).digest()