Added exceptions for pld getheader()

This commit is contained in:
_ 2018-05-17 11:35:19 -07:00
parent 201df8d366
commit cef4720e42

View File

@ -38,7 +38,8 @@ class pyPldHeader:
# Store C Struct in order to call C functions
self.cstruct = PldHeader()
if filedata:
devil1pld.getheader(ctypes.byref(self.cstruct), filedata)
if not devil1pld.getheader(ctypes.byref(self.cstruct), filedata):
raise RuntimeError("failed to get .pld header")
self.eof = len(filedata)
def show(self):