From d2db117aa1450954f908eb738d8f188bde6d77aa Mon Sep 17 00:00:00 2001 From: icefire Date: Mon, 22 Jun 2009 17:29:36 -0700 Subject: [PATCH] Using exceptions now... --- TPL.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/TPL.py b/TPL.py index 64d8dab..65716d0 100644 --- a/TPL.py +++ b/TPL.py @@ -128,26 +128,22 @@ class TPL(): elif format == "CI4": texhead.format = 8 ''' ADD toCI4 ''' - print "toCI4 not done" - sys.exit(2) + raise Exception("toCI4 not done") #tpldata = self.toCI4((w, h), img) elif format == "CI8": texhead.format = 8 ''' ADD toCI8 ''' - print "toCI8 not done" - sys.exit(2) + raise Exception("toCI8 not done") #tpldata = self.toCI8((w, h), img) elif format == "CI14X2": texhead.format = 10 ''' ADD toCI14X2 ''' - print "toCI14X2 not done" - sys.exit(2) + raise Exception("toCI14X2 not done") #tpldata = self.toCI14X2((w, h), img) elif format == "CMP": texhead.format = 14 ''' ADD toCMP ''' - print "toCMP not done" - sys.exit(2) + raise Exception("toCMP not done") #tpldata = self.toCMP((w, h), img) texhead.data_off = 0x14 + len(texhead) texhead.wrap = [0, 0]